WebResourceErrorCompat
public abstract class WebResourceErrorCompat
Compatibility version of WebResourceError.
Summary
Public methods |
|
|---|---|
abstract int |
@RequiresFeature(name = WebViewFeature.NAVIGATION_GET_WEB_RESOURCE_ERROR, enforcement = "androidx.webkit.WebViewFeature#isFeatureSupported")Internal error code that may not be stable over time. |
abstract @NonNull CharSequence |
@RequiresFeature(name = WebViewFeature.WEB_RESOURCE_ERROR_GET_DESCRIPTION, enforcement = "androidx.webkit.WebViewFeature#isFeatureSupported")Gets the string describing the error. |
abstract int |
@RequiresFeature(name = WebViewFeature.WEB_RESOURCE_ERROR_GET_CODE, enforcement = "androidx.webkit.WebViewFeature#isFeatureSupported")Gets the error code of the error. |
Public methods
getDebugCode
@RequiresFeature(name = WebViewFeature.NAVIGATION_GET_WEB_RESOURCE_ERROR, enforcement = "androidx.webkit.WebViewFeature#isFeatureSupported")
public abstract int getDebugCode()
Internal error code that may not be stable over time. Intended purely for debugging purposes.
| Returns | |
|---|---|
int |
The internal error code |
| Throws | |
|---|---|
java.lang.UnsupportedOperationException |
if the |
getDescription
@RequiresFeature(name = WebViewFeature.WEB_RESOURCE_ERROR_GET_DESCRIPTION, enforcement = "androidx.webkit.WebViewFeature#isFeatureSupported")
public abstract @NonNull CharSequence getDescription()
Gets the string describing the error. Descriptions are localized, and thus can be used for communicating the problem to the user.
| Returns | |
|---|---|
@NonNull CharSequence |
The description of the error |
| Throws | |
|---|---|
java.lang.UnsupportedOperationException |
if the |
getErrorCode
@RequiresFeature(name = WebViewFeature.WEB_RESOURCE_ERROR_GET_CODE, enforcement = "androidx.webkit.WebViewFeature#isFeatureSupported")
public abstract int getErrorCode()
Gets the error code of the error. The code corresponds to one of the ERROR_* constants in WebViewClient.
| Returns | |
|---|---|
int |
The error code of the error |
| Throws | |
|---|---|
java.lang.UnsupportedOperationException |
if the |