blob: 3953f58ae600c28cdb53ca99e9800fd87dace3bb [file] [log] [blame]
Brian Carlstrom93201f52011-06-09 15:05:35 -07001/*
2 * Copyright (C) 2011 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17package android.security;
18
19/**
20 * Thrown on problems accessing the {@link KeyChain}.
21 *
22 * @hide to be unhidden as part of KeyChain API
23 */
24public class KeyChainException extends Exception {
25
26 /**
27 * Constructs a new {@code KeyChainException} that includes the
28 * current stack trace.
29 */
30 public KeyChainException() {
31 }
32
33 /**
34 * Constructs a new {@code KeyChainException} with the current stack
35 * trace and the specified detail message.
36 *
37 * @param detailMessage
38 * the detail message for this exception.
39 */
40 public KeyChainException(String detailMessage) {
41 super(detailMessage);
42 }
43
44 /**
45 * Constructs a new {@code KeyChainException} with the current stack
46 * trace, the specified detail message and the specified cause.
47 *
48 * @param message
49 * the detail message for this exception.
50 * @param cause
51 * the cause of this exception, may be {@code null}.
52 */
53 public KeyChainException(String message, Throwable cause) {
54 super(message, cause);
55 }
56
57 /**
58 * Constructs a new {@code KeyChainException} with the current stack
59 * trace and the specified cause.
60 *
61 * @param cause
62 * the cause of this exception, may be {@code null}.
63 */
64 public KeyChainException(Throwable cause) {
65 super((cause == null ? null : cause.toString()), cause);
66 }
67}