• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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.NonNull;
19 import android.net.ipsec.ike.ChildSessionCallback;
20 import android.net.ipsec.ike.IkeSessionCallback;
21 
22 /**
23  * IkeInternalException encapsulates all local implementation or resource related exceptions.
24  *
25  * <p>Causes may include exceptions such as {@link android.net.IpSecManager.SpiUnavailableException}
26  * when the requested SPI resources failed to be allocated.
27  */
28 public final class IkeInternalException extends IkeNonProtocolException {
29     /**
30      * Constructs a new exception with the specified cause.
31      *
32      * <p>Except for testing, IKE library users normally do not instantiate this object themselves
33      * but instead get a reference via {@link IkeSessionCallback} or {@link ChildSessionCallback}.
34      *
35      * @param cause the cause (which is saved for later retrieval by the {@link #getCause()}
36      *     method).
37      */
IkeInternalException(@onNull Throwable cause)38     public IkeInternalException(@NonNull Throwable cause) {
39         super(cause);
40     }
41 
42     /**
43      * Constructs a new exception with the specified cause.
44      *
45      * <p>Except for testing, IKE library users normally do not instantiate this object themselves
46      * but instead get a reference via {@link IkeSessionCallback} or {@link ChildSessionCallback}.
47      *
48      * @param message the descriptive message (which is saved for later retrieval by the {@link
49      *     #getMessage()} method).
50      * @param cause the cause (which is saved for later retrieval by the {@link #getCause()}
51      *     method).
52      */
IkeInternalException(@onNull String message, @NonNull Throwable cause)53     public IkeInternalException(@NonNull String message, @NonNull Throwable cause) {
54         super(message, cause);
55     }
56 }
57