blob: 11f1b6f175669b6f2336b97b15d67621495c7d42 [file] [log] [blame]
Mikhail Naganov25e89542015-02-09 17:01:40 +00001/*
2 * Copyright (C) 2015 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.webkit;
18
Mikhail Naganov8d4f07f2015-05-12 17:44:15 -070019import android.annotation.SystemApi;
20
Mikhail Naganov25e89542015-02-09 17:01:40 +000021/**
22 * Encapsulates information about errors occured during loading of web resources. See
23 * {@link WebViewClient#onReceivedError(WebView, WebResourceRequest, WebResourceError) WebViewClient.onReceivedError(WebView, WebResourceRequest, WebResourceError)}
24 */
25public abstract class WebResourceError {
26 /**
27 * Gets the error code of the error. The code corresponds to one
28 * of the ERROR_* constants in {@link WebViewClient}.
29 *
30 * @return The error code of the error
31 */
32 public abstract int getErrorCode();
33
34 /**
35 * Gets the string describing the error. Descriptions are localized,
36 * and thus can be used for communicating the problem to the user.
37 *
38 * @return The description of the error
39 */
Selim Gurun98fe09c2015-05-21 17:24:08 -070040 public abstract CharSequence getDescription();
Mikhail Naganov8d4f07f2015-05-12 17:44:15 -070041
42 /**
43 * This class can not be subclassed by applications.
44 * @hide
45 */
46 @SystemApi
47 public WebResourceError() {}
Mikhail Naganov25e89542015-02-09 17:01:40 +000048}