Class ErrorHandler

java.lang.Object
com.vaadin.copilot.CopilotCommand
com.vaadin.copilot.ErrorHandler

public class ErrorHandler extends CopilotCommand
  • Field Details

  • Constructor Details

    • ErrorHandler

      public ErrorHandler()
  • Method Details

    • toJson

      public static elemental.json.JsonArray toJson(Throwable e)
    • setErrorMessage

      public static void setErrorMessage(elemental.json.JsonObject respData, String error)
    • setError

      public static void setError(elemental.json.JsonObject respData, String errorMessage, Throwable e)
    • sendErrorResponse

      public static void sendErrorResponse(com.vaadin.base.devserver.DevToolsInterface devToolsInterface, String command, elemental.json.JsonObject responseData, String error, Throwable e)
    • handleMessage

      public boolean handleMessage(String command, elemental.json.JsonObject data, com.vaadin.base.devserver.DevToolsInterface devToolsInterface)
      Description copied from class: CopilotCommand
      Called whenever there is a message from the browser. Implementations should check if the command is for them, handle it and return true if the command was handled.
      Specified by:
      handleMessage in class CopilotCommand
      Parameters:
      command - the command to handle
      data - the data for the command
      devToolsInterface - the devtools interface for the connection
      Returns:
      true if the command was handled, false otherwise