Class ErrorNumException

All Implemented Interfaces:
Serializable
Direct Known Subclasses:
BadRequestException, ConfigurationException, NotFoundException, ServerException

public class ErrorNumException extends RuntimeException
An exception that has a HTTP status code and a custom subErrorCode (which can be a specific error) These two errors make the exception very specific It can contain further errors that are supported by the ResponseMessage
See Also:
  • Field Details

  • Constructor Details

    • ErrorNumException

      public ErrorNumException()
    • ErrorNumException

      public ErrorNumException(ResponseMessage responseMessage)
    • ErrorNumException

      public ErrorNumException(int errorNum, String message, Throwable cause)
      Parameters:
      errorNum - - The root error code - same as Http Response code
      message - - a message in english. Ideally you should use Message bundles
      cause - - the root cause of the error
    • ErrorNumException

      public ErrorNumException(int errorNum, Object[] params, Throwable cause)
      Parameters:
      errorNum - - The root error code - same as Http Response code
      params - - The Params that need to be passed to the message bundle
      cause - - the root cause of the error
    • ErrorNumException

      public ErrorNumException(int errorNum, int subErrorNum, String message, Throwable cause)
      Parameters:
      errorNum - - the root error code - same as Http Response code
      subErrorNum - - the sub error code
      message - - the message in english. Ideally message bundles must be used.
      cause - - the root cause of the error
    • ErrorNumException

      public ErrorNumException(int errorNum, int subErrorNum, Object[] params, Throwable cause)
      Parameters:
      errorNum - - the root error code - same as Http Response code
      subErrorNum - - the sub error code
      params - - the params to be passed to the message bundle
      cause - - the root cause of the error
    • ErrorNumException

      public ErrorNumException(int errorNum, String message)
      Parameters:
      errorNum - - the root error code - same as Http Response code
      message - - the message in english. Ideally message bundles must be used.
    • ErrorNumException

      public ErrorNumException(int errorNum, Object[] params)
      Parameters:
      errorNum - - the root error code - same as Http Response code
      params - - the params to be passed to the message bundle
    • ErrorNumException

      public ErrorNumException(int errorNum, int subErrorNum, String message)
      Parameters:
      errorNum - - the root error code - same as Http Response code
      subErrorNum - - the sub error code
      message - - the message in english. Ideally message bundles must be used.
    • ErrorNumException

      public ErrorNumException(int errorNum, int subErrorNum, Object[] params)
      /**
      Parameters:
      errorNum - - the root error code - same as Http Response code
      subErrorNum - - the sub error code
      params - - the params to be passed to the message bundle
  • Method Details