Class (WebResourceError)
Implements the WebResourceError object to manage resource errors. For details about the sample code, see onErrorReceive.
NOTE
The initial APIs of this component are supported since API version 8. Updates will be marked with a superscript to indicate their earliest API version.
The initial APIs of this class are supported since API version 8.
The sample effect is subject to the actual device.
constructor
constructor()
Constructs a WebResourceError object.
System capability: SystemCapability.Web.Webview.Core
getErrorCode
getErrorCode(): number
Obtains the error code for resource loading.
System capability: SystemCapability.Web.Webview.Core
Return value
| Type | Description |
|---|---|
| number | Error code for resource loading. For details about the error code, see WebNetErrorList and HTTP status codes. |
getErrorInfo
getErrorInfo(): string
Obtains error information about resource loading.
System capability: SystemCapability.Web.Webview.Core
Return value
| Type | Description |
|---|---|
| string | Error information about resource loading. |
你可能感兴趣的鸿蒙文章
openharmony 鸿蒙 arkts-apis-webview-WebviewController
openharmony 鸿蒙 arkts-apis-webview-t
openharmony 鸿蒙 arkts-apis-webview
openharmony 鸿蒙 capi-arkweb-type-h
openharmony 鸿蒙 arkts-basic-components-web-FullScreenExitHandler
openharmony 鸿蒙 arkts-apis-webview-WebDownloadManager
openharmony 鸿蒙 arkts-basic-components-web-VerifyPinHandler
openharmony 鸿蒙 capi-web-arkweb-webmessage8h