1b6a4d96a310a1dee22ddea89b09130bcda206bb3Paul Rohde/* 2b6a4d96a310a1dee22ddea89b09130bcda206bb3Paul Rohde * Copyright (C) 2015 The Android Open Source Project 3b6a4d96a310a1dee22ddea89b09130bcda206bb3Paul Rohde * 4b6a4d96a310a1dee22ddea89b09130bcda206bb3Paul Rohde * Licensed under the Apache License, Version 2.0 (the "License"); 5b6a4d96a310a1dee22ddea89b09130bcda206bb3Paul Rohde * you may not use this file except in compliance with the License. 6b6a4d96a310a1dee22ddea89b09130bcda206bb3Paul Rohde * You may obtain a copy of the License at 7b6a4d96a310a1dee22ddea89b09130bcda206bb3Paul Rohde * 8b6a4d96a310a1dee22ddea89b09130bcda206bb3Paul Rohde * http://www.apache.org/licenses/LICENSE-2.0 9b6a4d96a310a1dee22ddea89b09130bcda206bb3Paul Rohde * 10b6a4d96a310a1dee22ddea89b09130bcda206bb3Paul Rohde * Unless required by applicable law or agreed to in writing, software 11b6a4d96a310a1dee22ddea89b09130bcda206bb3Paul Rohde * distributed under the License is distributed on an "AS IS" BASIS, 12b6a4d96a310a1dee22ddea89b09130bcda206bb3Paul Rohde * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13b6a4d96a310a1dee22ddea89b09130bcda206bb3Paul Rohde * See the License for the specific language governing permissions and 14b6a4d96a310a1dee22ddea89b09130bcda206bb3Paul Rohde * limitations under the License. 15b6a4d96a310a1dee22ddea89b09130bcda206bb3Paul Rohde */ 16b6a4d96a310a1dee22ddea89b09130bcda206bb3Paul Rohde 17b6a4d96a310a1dee22ddea89b09130bcda206bb3Paul Rohdepackage com.android.camera.device; 18b6a4d96a310a1dee22ddea89b09130bcda206bb3Paul Rohde 19b6a4d96a310a1dee22ddea89b09130bcda206bb3Paul Rohde/** 20b6a4d96a310a1dee22ddea89b09130bcda206bb3Paul Rohde * Indicates that onError occured immediatly after attempting to open 21b6a4d96a310a1dee22ddea89b09130bcda206bb3Paul Rohde * the camera. 22b6a4d96a310a1dee22ddea89b09130bcda206bb3Paul Rohde */ 23b6a4d96a310a1dee22ddea89b09130bcda206bb3Paul Rohdepublic final class CameraOpenException extends Exception { 24b6a4d96a310a1dee22ddea89b09130bcda206bb3Paul Rohde private final int mErrorId; 25b6a4d96a310a1dee22ddea89b09130bcda206bb3Paul Rohde 26b6a4d96a310a1dee22ddea89b09130bcda206bb3Paul Rohde public CameraOpenException(int errorId) { 27b6a4d96a310a1dee22ddea89b09130bcda206bb3Paul Rohde mErrorId = errorId; 28b6a4d96a310a1dee22ddea89b09130bcda206bb3Paul Rohde } 29b6a4d96a310a1dee22ddea89b09130bcda206bb3Paul Rohde 30b6a4d96a310a1dee22ddea89b09130bcda206bb3Paul Rohde /** 31b6a4d96a310a1dee22ddea89b09130bcda206bb3Paul Rohde * @return The error code. 32b6a4d96a310a1dee22ddea89b09130bcda206bb3Paul Rohde */ 33b6a4d96a310a1dee22ddea89b09130bcda206bb3Paul Rohde public int getErrorId() { 34b6a4d96a310a1dee22ddea89b09130bcda206bb3Paul Rohde return mErrorId; 35b6a4d96a310a1dee22ddea89b09130bcda206bb3Paul Rohde } 36b6a4d96a310a1dee22ddea89b09130bcda206bb3Paul Rohde} 37