Class BaseException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- org.apache.directory.fortress.core.BaseException
-
- All Implemented Interfaces:
Serializable
,StandardException
- Direct Known Subclasses:
SecurityException
public abstract class BaseException extends Exception implements StandardException
Base exception class for checked exceptions thrown. This class wrapsjava.lang.Exception
. The BaseException class adds int attribute which stores the necessary error code as required by all checked exceptions in this system. The BaseException class has been extended bySecurityException
which is then declared thrown on most Fortress public APIs. See theGlobalErrIds
javadoc for list of error ids that will be set.- Author:
- Apache Directory Project
- See Also:
- Serialized Form
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getErrorId()
Return the error id that is defined by this classGlobalErrIds
.int
getHttpStatus()
Returns the HTTP Status code mapped to represent this errorvoid
setHttpStatus(int httpStatus)
-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
-
-
-
Method Detail
-
getErrorId
public int getErrorId()
Return the error id that is defined by this classGlobalErrIds
.- Specified by:
getErrorId
in interfaceStandardException
- Returns:
- error id which is defined here
GlobalErrIds
. Valid values for Fortress error codes fall between 0 and 100_000.
-
getHttpStatus
public int getHttpStatus()
Returns the HTTP Status code mapped to represent this error- Returns:
- HTTP status code assigned for this exception
-
setHttpStatus
public void setHttpStatus(int httpStatus)
-
-