Class ErrorModel

java.lang.Object
io.hotmoka.network.errors.ErrorModel

public class ErrorModel extends Object
The model of an exception thrown by a REST method.
  • Field Details

    • message

      public String message
      The message of the exception.
    • exceptionClassName

      public String exceptionClassName
      The fully-qualified name of the class of the exception.
  • Constructor Details

    • ErrorModel

      public ErrorModel(String message, Class<? extends Exception> exceptionClass)
      Builds the model of an exception thrown by a REST method.
      Parameters:
      message - the message of the exception
      exceptionClass - the class of the exception
    • ErrorModel

      public ErrorModel()
    • ErrorModel

      public ErrorModel(Exception e)
      Builds the model of an exception thrown by a REST method.
      Parameters:
      e - the exception