Class XhrConnectionError


  • public class XhrConnectionError
    extends Object
    XhrConnectionError provides detail about an error which occurred during an XHR request to the server.
    Since:
    1.0
    Author:
    Vaadin Ltd
    • Constructor Detail

      • XhrConnectionError

        public XhrConnectionError​(com.google.gwt.xhr.client.XMLHttpRequest xhr,
                                  elemental.json.JsonObject payload,
                                  Exception exception)
        Creates a XhrConnectionError for the given request using the given payload.
        Parameters:
        xhr - the request which caused the error
        payload - the payload which was on its way to the server
        exception - the exception which caused the error or null if the error was not caused by an exception
    • Method Detail

      • getException

        public Exception getException()
        Returns the exception which caused the problem, if available.
        Returns:
        the exception which caused the problem, or null if not available
      • getXhr

        public com.google.gwt.xhr.client.XMLHttpRequest getXhr()
        Returns XMLHttpRequest which failed to reach the server.
        Returns:
        the request which failed
      • getPayload

        public elemental.json.JsonObject getPayload()
        Returns the payload which was sent to the server.
        Returns:
        the payload which was sent, never null