Class ErrorObject
- java.lang.Object
-
- de.uplanet.lucy.server.composer.ixservlet.ErrorObject
-
public final class ErrorObject extends Object
An error object for the Velocity context.
-
-
Constructor Summary
Constructors Constructor Description ErrorObject()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ThrowablegetCauseOfType(String p_strExceptionClass)Get the first error cause of the given type.ThrowablegetError()Get the error hold by this object.booleanhasError()Check if this error object holds an error.booleanisCausedBy(String p_strExceptionClass)Check if the error is or is caused by an exception of the given type.booleanisCausedByAccessControlException()Check if the error is or is caused by ajava.security.AccessControlException.booleanisSilentMode()Returns true, if all errors should be suppressed.voidsetError(Throwable p_error)Put an error into this error object.
-
-
-
Method Detail
-
hasError
public boolean hasError()
Check if this error object holds an error.- Returns:
trueif this error object holds an error, orfalseotherwise.
-
isCausedBy
public boolean isCausedBy(String p_strExceptionClass) throws ClassNotFoundException
Check if the error is or is caused by an exception of the given type.- Parameters:
p_strExceptionClass- The type of the exception.- Returns:
trueif this error object holds an error that is caused by the given exception type, orfalseotherwise.- Throws:
ClassNotFoundException- - Ifp_strExceptionClassis not found.- See Also:
ExceptionUtil.isCausedBy(Throwable, String)
-
getCauseOfType
public Throwable getCauseOfType(String p_strExceptionClass) throws ClassNotFoundException
Get the first error cause of the given type.- Parameters:
p_strExceptionClass- The type of the exception.- Returns:
- The first cause of the given type, or
nullif no such cause could be found. - Throws:
ClassNotFoundException- - Ifp_strExceptionClassis not found.
-
isCausedByAccessControlException
public boolean isCausedByAccessControlException()
Check if the error is or is caused by ajava.security.AccessControlException.- Returns:
trueif this error object holds an error that is caused by ajava.security.AccessControlException, orfalseotherwise.
-
getError
public Throwable getError()
Get the error hold by this object.- Returns:
- The error, or
nullifhasError()isfalse.
-
isSilentMode
public boolean isSilentMode()
Returns true, if all errors should be suppressed.- Returns:
trueif the error should be suppressed.
-
setError
public void setError(Throwable p_error)
Put an error into this error object.- Parameters:
p_error- The error to be set.
-
-