Package org.mozilla.geckoview
Class WebRequestError
- All Implemented Interfaces:
Serializable
WebRequestError is simply a container for error codes and categories used by
GeckoSession.NavigationDelegate.onLoadError(GeckoSession, String, WebRequestError)
.- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic @interface
static @interface
-
Field Summary
Modifier and TypeFieldDescriptionfinal int
The error category, e.g.final X509Certificate
The server certificate used.final int
The error code, e.g.static final int
A certificate validation error occurred when connecting to a site that does not allow error overrides.static final int
This is used for error codes relating to invalid or corrupt web pages.static final int
This is used for error codes relating to network problems.static final int
static final int
static final int
This is used for error codes that relate to SSL certificate validation.static final int
This is normally used for error codes that don't currently fit into any of the other categories.static final int
static final int
The network request was refused by the server.static final int
The content process crashed.static final int
The content returned was corrupted.static final int
A data:// URI is too long to load at the top level.static final int
The OS blocked access to a file.static final int
A file was not found (usually used for file:// URIs).static final int
GeckoView could not connect to this website in HTTPS-only mode.static final int
The content has an invalid encoding.static final int
An invalid URL was specified.static final int
The network connection was interrupted.static final int
The connection was reset.static final int
The network request timed out.static final int
This device does not have a network connection.static final int
The request tried to use a port that is blocked by either the OS or Gecko.static final int
The proxy server refused the connection.static final int
A redirect loop was detected.static final int
The requested URI was present in the "harmful" blocklist.static final int
The requested URI was present in the "malware" blocklist.static final int
The requested URI was present in the "phishing" blocklist.static final int
The requested URI was present in the "unwanted" blocklist.static final int
This is used to indicate an untrusted or otherwise invalid SSL certificate.static final int
This is used for a variety of SSL negotiation problems.static final int
An unknown error occurredstatic final int
The host could not be resolved.static final int
An unknown protocol was specified.static final int
The host name of the proxy server could not be resolved.static final int
The network request tried to use an unknown socket type.static final int
A content type was returned which was deemed unsafe. -
Constructor Summary
ConstructorDescriptionWebRequestError
(int code, int category) Construct a new WebRequestError with the specified code and category.WebRequestError
(int code, int category, X509Certificate certificate) Construct a new WebRequestError with the specified code and category. -
Method Summary
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Field Details
-
ERROR_CATEGORY_UNKNOWN
public static final int ERROR_CATEGORY_UNKNOWNThis is normally used for error codes that don't currently fit into any of the other categories.- See Also:
-
ERROR_CATEGORY_SECURITY
public static final int ERROR_CATEGORY_SECURITYThis is used for error codes that relate to SSL certificate validation.- See Also:
-
ERROR_CATEGORY_NETWORK
public static final int ERROR_CATEGORY_NETWORKThis is used for error codes relating to network problems.- See Also:
-
ERROR_CATEGORY_CONTENT
public static final int ERROR_CATEGORY_CONTENTThis is used for error codes relating to invalid or corrupt web pages.- See Also:
-
ERROR_CATEGORY_URI
public static final int ERROR_CATEGORY_URI- See Also:
-
ERROR_CATEGORY_PROXY
public static final int ERROR_CATEGORY_PROXY- See Also:
-
ERROR_CATEGORY_SAFEBROWSING
public static final int ERROR_CATEGORY_SAFEBROWSING- See Also:
-
ERROR_UNKNOWN
public static final int ERROR_UNKNOWNAn unknown error occurred- See Also:
-
ERROR_SECURITY_SSL
public static final int ERROR_SECURITY_SSLThis is used for a variety of SSL negotiation problems.- See Also:
-
ERROR_SECURITY_BAD_CERT
public static final int ERROR_SECURITY_BAD_CERTThis is used to indicate an untrusted or otherwise invalid SSL certificate.- See Also:
-
ERROR_NET_INTERRUPT
public static final int ERROR_NET_INTERRUPTThe network connection was interrupted.- See Also:
-
ERROR_NET_TIMEOUT
public static final int ERROR_NET_TIMEOUTThe network request timed out.- See Also:
-
ERROR_CONNECTION_REFUSED
public static final int ERROR_CONNECTION_REFUSEDThe network request was refused by the server.- See Also:
-
ERROR_UNKNOWN_SOCKET_TYPE
public static final int ERROR_UNKNOWN_SOCKET_TYPEThe network request tried to use an unknown socket type.- See Also:
-
ERROR_REDIRECT_LOOP
public static final int ERROR_REDIRECT_LOOPA redirect loop was detected.- See Also:
-
ERROR_OFFLINE
public static final int ERROR_OFFLINEThis device does not have a network connection.- See Also:
-
ERROR_PORT_BLOCKED
public static final int ERROR_PORT_BLOCKEDThe request tried to use a port that is blocked by either the OS or Gecko.- See Also:
-
ERROR_NET_RESET
public static final int ERROR_NET_RESETThe connection was reset.- See Also:
-
ERROR_HTTPS_ONLY
public static final int ERROR_HTTPS_ONLYGeckoView could not connect to this website in HTTPS-only mode. Call document.reloadWithHttpsOnlyException() in the error page to temporarily disable HTTPS only mode for this request.- See Also:
-
ERROR_BAD_HSTS_CERT
public static final int ERROR_BAD_HSTS_CERTA certificate validation error occurred when connecting to a site that does not allow error overrides.- See Also:
-
ERROR_UNSAFE_CONTENT_TYPE
public static final int ERROR_UNSAFE_CONTENT_TYPEA content type was returned which was deemed unsafe.- See Also:
-
ERROR_CORRUPTED_CONTENT
public static final int ERROR_CORRUPTED_CONTENTThe content returned was corrupted.- See Also:
-
ERROR_CONTENT_CRASHED
public static final int ERROR_CONTENT_CRASHEDThe content process crashed.- See Also:
-
ERROR_INVALID_CONTENT_ENCODING
public static final int ERROR_INVALID_CONTENT_ENCODINGThe content has an invalid encoding.- See Also:
-
ERROR_UNKNOWN_HOST
public static final int ERROR_UNKNOWN_HOSTThe host could not be resolved.- See Also:
-
ERROR_MALFORMED_URI
public static final int ERROR_MALFORMED_URIAn invalid URL was specified.- See Also:
-
ERROR_UNKNOWN_PROTOCOL
public static final int ERROR_UNKNOWN_PROTOCOLAn unknown protocol was specified.- See Also:
-
ERROR_FILE_NOT_FOUND
public static final int ERROR_FILE_NOT_FOUNDA file was not found (usually used for file:// URIs).- See Also:
-
ERROR_FILE_ACCESS_DENIED
public static final int ERROR_FILE_ACCESS_DENIEDThe OS blocked access to a file.- See Also:
-
ERROR_DATA_URI_TOO_LONG
public static final int ERROR_DATA_URI_TOO_LONGA data:// URI is too long to load at the top level.- See Also:
-
ERROR_PROXY_CONNECTION_REFUSED
public static final int ERROR_PROXY_CONNECTION_REFUSEDThe proxy server refused the connection.- See Also:
-
ERROR_UNKNOWN_PROXY_HOST
public static final int ERROR_UNKNOWN_PROXY_HOSTThe host name of the proxy server could not be resolved.- See Also:
-
ERROR_SAFEBROWSING_MALWARE_URI
public static final int ERROR_SAFEBROWSING_MALWARE_URIThe requested URI was present in the "malware" blocklist.- See Also:
-
ERROR_SAFEBROWSING_UNWANTED_URI
public static final int ERROR_SAFEBROWSING_UNWANTED_URIThe requested URI was present in the "unwanted" blocklist.- See Also:
-
ERROR_SAFEBROWSING_HARMFUL_URI
public static final int ERROR_SAFEBROWSING_HARMFUL_URIThe requested URI was present in the "harmful" blocklist.- See Also:
-
ERROR_SAFEBROWSING_PHISHING_URI
public static final int ERROR_SAFEBROWSING_PHISHING_URIThe requested URI was present in the "phishing" blocklist.- See Also:
-
code
public final int codeThe error code, e.g.ERROR_MALFORMED_URI
. -
category
public final int categoryThe error category, e.g.ERROR_CATEGORY_URI
. -
certificate
The server certificate used. This can be useful if the error code is is e.g.ERROR_SECURITY_BAD_CERT
.
-
-
Constructor Details
-
WebRequestError
public WebRequestError(int code, int category) Construct a new WebRequestError with the specified code and category.- Parameters:
code
- An error code, e.g.ERROR_MALFORMED_URI
category
- An error category, e.g.ERROR_CATEGORY_URI
-
WebRequestError
Construct a new WebRequestError with the specified code and category.- Parameters:
code
- An error code, e.g.ERROR_MALFORMED_URI
category
- An error category, e.g.ERROR_CATEGORY_URI
certificate
- The X509Certificate server certificate used, if applicable.
-
-
Method Details