Class StException

java.lang.Object
java.lang.Throwable
java.lang.Exception
com.io7m.stonesignal.server.errors.StException
All Implemented Interfaces:
com.io7m.seltzer.api.SStructuredErrorExceptionType<StErrorCode>, com.io7m.seltzer.api.SStructuredErrorType<StErrorCode>, Serializable

public class StException extends Exception implements com.io7m.seltzer.api.SStructuredErrorExceptionType<StErrorCode>
The type of exceptions.
See Also:
  • Constructor Details

    • StException

      public StException(String message, StErrorCode inErrorCode, Map<String,String> inAttributes, Optional<String> inRemediatingAction)
      Construct an exception.
      Parameters:
      message - The message
      inErrorCode - The error code
      inAttributes - The error attributes
      inRemediatingAction - The remediating action, if any
    • StException

      public StException(String message, Throwable cause, StErrorCode inErrorCode, Map<String,String> inAttributes, Optional<String> inRemediatingAction)
      Construct an exception.
      Parameters:
      message - The message
      cause - The cause
      inErrorCode - The error code
      inAttributes - The error attributes
      inRemediatingAction - The remediating action, if any
  • Method Details

    • errorCode

      public final StErrorCode errorCode()
      Specified by:
      errorCode in interface com.io7m.seltzer.api.SStructuredErrorType<StErrorCode>
    • attributes

      public final Map<String,String> attributes()
      Specified by:
      attributes in interface com.io7m.seltzer.api.SStructuredErrorType<StErrorCode>
    • remediatingAction

      public final Optional<String> remediatingAction()
      Specified by:
      remediatingAction in interface com.io7m.seltzer.api.SStructuredErrorType<StErrorCode>
    • exception

      public final Optional<Throwable> exception()
      Specified by:
      exception in interface com.io7m.seltzer.api.SStructuredErrorType<StErrorCode>