1 /*
2  * Copyright (C) 2019 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 package android.net.ipsec.ike.exceptions;
17 
18 import android.annotation.SystemApi;
19 
20 /**
21  * IkeInternalException encapsulates all local implementation or resource related exceptions.
22  *
23  * <p>Causes may include exceptions such as {@link IpSecManager.SpiUnavailableException} when the
24  * requested SPI resources failed to be allocated.
25  *
26  * @hide
27  */
28 @SystemApi
29 public final class IkeInternalException extends IkeException {
30     /**
31      * Constructs a new exception with the specified cause.
32      *
33      * @param cause the cause (which is saved for later retrieval by the {@link #getCause()}
34      *     method).
35      * @hide
36      */
IkeInternalException(Throwable cause)37     public IkeInternalException(Throwable cause) {
38         super(cause);
39     }
40 
41     /**
42      * Constructs a new exception with the specified cause.
43      *
44      * @param message the descriptive message.
45      * @param cause the cause (which is saved for later retrieval by the {@link #getCause()}
46      *     method).
47      * @hide
48      */
IkeInternalException(String message, Throwable cause)49     public IkeInternalException(String message, Throwable cause) {
50         super(message, cause);
51     }
52 }
53