193201f545b67da15cb69830a5988810aef52c0b2Brian Carlstrom/* 293201f545b67da15cb69830a5988810aef52c0b2Brian Carlstrom * Copyright (C) 2011 The Android Open Source Project 393201f545b67da15cb69830a5988810aef52c0b2Brian Carlstrom * 493201f545b67da15cb69830a5988810aef52c0b2Brian Carlstrom * Licensed under the Apache License, Version 2.0 (the "License"); 593201f545b67da15cb69830a5988810aef52c0b2Brian Carlstrom * you may not use this file except in compliance with the License. 693201f545b67da15cb69830a5988810aef52c0b2Brian Carlstrom * You may obtain a copy of the License at 793201f545b67da15cb69830a5988810aef52c0b2Brian Carlstrom * 893201f545b67da15cb69830a5988810aef52c0b2Brian Carlstrom * http://www.apache.org/licenses/LICENSE-2.0 993201f545b67da15cb69830a5988810aef52c0b2Brian Carlstrom * 1093201f545b67da15cb69830a5988810aef52c0b2Brian Carlstrom * Unless required by applicable law or agreed to in writing, software 1193201f545b67da15cb69830a5988810aef52c0b2Brian Carlstrom * distributed under the License is distributed on an "AS IS" BASIS, 1293201f545b67da15cb69830a5988810aef52c0b2Brian Carlstrom * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1393201f545b67da15cb69830a5988810aef52c0b2Brian Carlstrom * See the License for the specific language governing permissions and 1493201f545b67da15cb69830a5988810aef52c0b2Brian Carlstrom * limitations under the License. 1593201f545b67da15cb69830a5988810aef52c0b2Brian Carlstrom */ 1693201f545b67da15cb69830a5988810aef52c0b2Brian Carlstrom 1793201f545b67da15cb69830a5988810aef52c0b2Brian Carlstrompackage android.security; 1893201f545b67da15cb69830a5988810aef52c0b2Brian Carlstrom 1993201f545b67da15cb69830a5988810aef52c0b2Brian Carlstrom/** 2093201f545b67da15cb69830a5988810aef52c0b2Brian Carlstrom * Thrown on problems accessing the {@link KeyChain}. 2193201f545b67da15cb69830a5988810aef52c0b2Brian Carlstrom */ 2293201f545b67da15cb69830a5988810aef52c0b2Brian Carlstrompublic class KeyChainException extends Exception { 2393201f545b67da15cb69830a5988810aef52c0b2Brian Carlstrom 2493201f545b67da15cb69830a5988810aef52c0b2Brian Carlstrom /** 2593201f545b67da15cb69830a5988810aef52c0b2Brian Carlstrom * Constructs a new {@code KeyChainException} that includes the 2693201f545b67da15cb69830a5988810aef52c0b2Brian Carlstrom * current stack trace. 2793201f545b67da15cb69830a5988810aef52c0b2Brian Carlstrom */ 2893201f545b67da15cb69830a5988810aef52c0b2Brian Carlstrom public KeyChainException() { 2993201f545b67da15cb69830a5988810aef52c0b2Brian Carlstrom } 3093201f545b67da15cb69830a5988810aef52c0b2Brian Carlstrom 3193201f545b67da15cb69830a5988810aef52c0b2Brian Carlstrom /** 3293201f545b67da15cb69830a5988810aef52c0b2Brian Carlstrom * Constructs a new {@code KeyChainException} with the current stack 3393201f545b67da15cb69830a5988810aef52c0b2Brian Carlstrom * trace and the specified detail message. 3493201f545b67da15cb69830a5988810aef52c0b2Brian Carlstrom * 3593201f545b67da15cb69830a5988810aef52c0b2Brian Carlstrom * @param detailMessage 3693201f545b67da15cb69830a5988810aef52c0b2Brian Carlstrom * the detail message for this exception. 3793201f545b67da15cb69830a5988810aef52c0b2Brian Carlstrom */ 3893201f545b67da15cb69830a5988810aef52c0b2Brian Carlstrom public KeyChainException(String detailMessage) { 3993201f545b67da15cb69830a5988810aef52c0b2Brian Carlstrom super(detailMessage); 4093201f545b67da15cb69830a5988810aef52c0b2Brian Carlstrom } 4193201f545b67da15cb69830a5988810aef52c0b2Brian Carlstrom 4293201f545b67da15cb69830a5988810aef52c0b2Brian Carlstrom /** 4393201f545b67da15cb69830a5988810aef52c0b2Brian Carlstrom * Constructs a new {@code KeyChainException} with the current stack 4493201f545b67da15cb69830a5988810aef52c0b2Brian Carlstrom * trace, the specified detail message and the specified cause. 4593201f545b67da15cb69830a5988810aef52c0b2Brian Carlstrom * 4693201f545b67da15cb69830a5988810aef52c0b2Brian Carlstrom * @param message 4793201f545b67da15cb69830a5988810aef52c0b2Brian Carlstrom * the detail message for this exception. 4893201f545b67da15cb69830a5988810aef52c0b2Brian Carlstrom * @param cause 4993201f545b67da15cb69830a5988810aef52c0b2Brian Carlstrom * the cause of this exception, may be {@code null}. 5093201f545b67da15cb69830a5988810aef52c0b2Brian Carlstrom */ 5193201f545b67da15cb69830a5988810aef52c0b2Brian Carlstrom public KeyChainException(String message, Throwable cause) { 5293201f545b67da15cb69830a5988810aef52c0b2Brian Carlstrom super(message, cause); 5393201f545b67da15cb69830a5988810aef52c0b2Brian Carlstrom } 5493201f545b67da15cb69830a5988810aef52c0b2Brian Carlstrom 5593201f545b67da15cb69830a5988810aef52c0b2Brian Carlstrom /** 5693201f545b67da15cb69830a5988810aef52c0b2Brian Carlstrom * Constructs a new {@code KeyChainException} with the current stack 5793201f545b67da15cb69830a5988810aef52c0b2Brian Carlstrom * trace and the specified cause. 5893201f545b67da15cb69830a5988810aef52c0b2Brian Carlstrom * 5993201f545b67da15cb69830a5988810aef52c0b2Brian Carlstrom * @param cause 6093201f545b67da15cb69830a5988810aef52c0b2Brian Carlstrom * the cause of this exception, may be {@code null}. 6193201f545b67da15cb69830a5988810aef52c0b2Brian Carlstrom */ 6293201f545b67da15cb69830a5988810aef52c0b2Brian Carlstrom public KeyChainException(Throwable cause) { 6393201f545b67da15cb69830a5988810aef52c0b2Brian Carlstrom super((cause == null ? null : cause.toString()), cause); 6493201f545b67da15cb69830a5988810aef52c0b2Brian Carlstrom } 6593201f545b67da15cb69830a5988810aef52c0b2Brian Carlstrom} 66