Class IMCException

All Implemented Interfaces:
Serializable

public class IMCException extends Exception
The base class of all exceptions in IMC Product, the methods can throw this exception XXX use builder for instantiation???
See Also:
  • Constructor Details

  • Method Details

    • wrap

      public static IMCException wrap(Throwable cause)
      Wraps the given exception in a new IMCException with internal error code or returns the exception as is in case it is already a IMCException.
      Parameters:
      cause - the exception to wrap
      Returns:
      a new IMCException or the original exception in case it is already a IMCException
    • wrap

      public static IMCException wrap(Throwable cause, String remark, String errorCode)
      Wraps the given exception in a new IMCException with internal error code or returns the exception as is in case it is already a IMCException.
      Parameters:
      cause - the exception to wrap
      Returns:
      a new IMCException or the original exception in case it is already a IMCException
    • getAdditionalErrors

      public List<String> getAdditionalErrors()
    • getArguments

      public Object[] getArguments()
    • getErrorCode

      public String getErrorCode()
      Error code is mandatory so is ensured to be non null.
    • isRecoverable

      public boolean isRecoverable()
    • print

      public void print()
    • setAdditionalErrors

      public void setAdditionalErrors(List<String> additionalErrors)