Package org.zkoss.lang
Class CommonException
java.lang.Object
java.lang.Throwable
java.lang.Exception
org.zkoss.lang.CommonException
- All Implemented Interfaces:
Serializable,Messageable,MessageConst
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:
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.zkoss.mesg.MessageConst
MessageConst.Aide, MessageConst.BundleInfo -
Field Summary
FieldsFields inherited from interface org.zkoss.mesg.MessageConst
NULL_CODE -
Constructor Summary
ConstructorsConstructorDescriptionCommonException(int code) CommonException(int code, Object fmtArg) CommonException(int code, Object[] fmtArgs) CommonException(int code, Object[] fmtArgs, Throwable cause) Constructs an CommonException by use of an error code.CommonException(int code, Object fmtArg, Throwable cause) CommonException(int code, Throwable cause) CommonException(String msg) CommonException(String msg, Throwable cause) Constructs an CommonException by specifying message directly.CommonException(Throwable cause) -
Method Summary
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Field Details
-
_code
protected int _code
-
-
Constructor Details
-
CommonException
Constructs an CommonException by specifying message directly. -
CommonException
-
CommonException
-
CommonException
public CommonException() -
CommonException
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 codefmtArgs- the format argumentscause- the chained throwable object
-
CommonException
-
CommonException
-
CommonException
-
CommonException
-
CommonException
public CommonException(int code)
-
-
Method Details
-
getCode
public final int getCode()Description copied from interface:MessageableGets the message code.- Specified by:
getCodein interfaceMessageable- Returns:
- the message code
-