blob: ca6d012dfe7c0ff6b8121056c6ece14e802d999b [file] [log] [blame]
Remi NGUYEN VANff0a5a72021-03-11 17:19:18 +09001/*
2 * Copyright (C) 2006 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.net;
18
19import android.annotation.NonNull;
Remi NGUYEN VAN94e5fff2021-03-15 10:20:40 +090020import android.annotation.SystemApi;
Remi NGUYEN VANff0a5a72021-03-11 17:19:18 +090021
22/**
23 * Thrown when parsing failed.
24 */
25// See non-public class {@link WebAddress}.
26public class ParseException extends RuntimeException {
27 public String response;
28
Remi NGUYEN VAN94e5fff2021-03-15 10:20:40 +090029 /** @hide */
30 @SystemApi(client = SystemApi.Client.MODULE_LIBRARIES)
31 public ParseException(@NonNull String response) {
Remi NGUYEN VANff0a5a72021-03-11 17:19:18 +090032 super(response);
33 this.response = response;
34 }
35
Remi NGUYEN VAN94e5fff2021-03-15 10:20:40 +090036 /** @hide */
37 @SystemApi(client = SystemApi.Client.MODULE_LIBRARIES)
38 public ParseException(@NonNull String response, @NonNull Throwable cause) {
Remi NGUYEN VANff0a5a72021-03-11 17:19:18 +090039 super(response, cause);
40 this.response = response;
41 }
42}