Class CommonException

All Implemented Interfaces:
Serializable, Messageable, MessageConst

public class CommonException extends Exception implements Messageable
The most fundamental non-runtime exception of Potix classes. All exceptions specific to Potix classes must derive from SystemException or CommonException.

SystemException indicates programming bugs, while CommonException indicates exceptional cases.

Author:
tomyeh
See Also:
  • Field Details

    • _code

      protected int _code
  • Constructor Details

    • CommonException

      public CommonException(String msg, Throwable cause)
      Constructs an CommonException by specifying message directly.
    • CommonException

      public CommonException(String msg)
    • CommonException

      public CommonException(Throwable cause)
    • CommonException

      public CommonException()
    • CommonException

      public CommonException(int code, Object[] fmtArgs, Throwable cause)
      Constructs an CommonException by use of an error code. The error code must be defined in one of properties files, e.g., msgsys.properties.
      Parameters:
      code - the error code
      fmtArgs - the format arguments
      cause - the chained throwable object
    • CommonException

      public CommonException(int code, Object fmtArg, Throwable cause)
    • CommonException

      public CommonException(int code, Object[] fmtArgs)
    • CommonException

      public CommonException(int code, Object fmtArg)
    • CommonException

      public CommonException(int code, Throwable cause)
    • CommonException

      public CommonException(int code)
  • Method Details

    • getCode

      public final int getCode()
      Description copied from interface: Messageable
      Gets the message code.
      Specified by:
      getCode in interface Messageable
      Returns:
      the message code