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
Nested ClassesModifier and TypeClassDescriptionstatic @interfaceError code definitions for web request errors.static @interfaceDefines the set of valid error categories for web request failures. -
Field Summary
FieldsModifier and TypeFieldDescriptionfinal intThe error category, e.g.final X509CertificateThe server certificate used.final intThe error code, e.g.static final intA certificate validation error occurred when connecting to a site that does not allow error overrides.static final intThis is used for error codes relating to invalid or corrupt web pages.static final intThis is used for error codes relating to network problems.static final intThis is used for error codes relating to proxy problems.static final intThis is used for error codes relating to safe browsing warnings.static final intThis is used for error codes that relate to SSL certificate validation.static final intThis is normally used for error codes that don't currently fit into any of the other categories.static final intThis is used for error codes relating to URI problems.static final intThe network request was refused by the server.static final intThe content process crashed.static final intThe content returned was corrupted.static final intA data:// URI is too long to load at the top level.static final intThe OS blocked access to a file.static final intA file was not found (usually used for file:// URIs).static final intGeckoView could not connect to this website in HTTPS-only mode.static final intThe content has an invalid encoding.static final intAn invalid URL was specified.static final intThe network connection was interrupted.static final intThe connection was reset.static final intThe network request timed out.static final intThis device does not have a network connection.static final intThe request tried to use a port that is blocked by either the OS or Gecko.static final intThe proxy server refused the connection.static final intA redirect loop was detected.static final intThe requested URI was present in the "harmful" blocklist.static final intThe requested URI was present in the "malware" blocklist.static final intThe requested URI was present in the "phishing" blocklist.static final intThe requested URI was present in the "unwanted" blocklist.static final intThis is used to indicate an untrusted or otherwise invalid SSL certificate.static final intThis is used for a variety of SSL negotiation problems.static final intAn unknown error occurredstatic final intThe host could not be resolved.static final intAn unknown protocol was specified.static final intThe host name of the proxy server could not be resolved.static final intThe network request tried to use an unknown socket type.static final intA content type was returned which was deemed unsafe. -
Constructor Summary
ConstructorsConstructorDescriptionWebRequestError(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_URIThis is used for error codes relating to URI problems.- See Also:
-
ERROR_CATEGORY_PROXY
public static final int ERROR_CATEGORY_PROXYThis is used for error codes relating to proxy problems.- See Also:
-
ERROR_CATEGORY_SAFEBROWSING
public static final int ERROR_CATEGORY_SAFEBROWSINGThis is used for error codes relating to safe browsing warnings.- 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_URIcategory- 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_URIcategory- An error category, e.g.ERROR_CATEGORY_URIcertificate- The X509Certificate server certificate used, if applicable.
-
-
Method Details