de.uplanet.lucy.server.composer.ixservlet
Class ErrorObject

java.lang.Object
  extended by de.uplanet.lucy.server.composer.ixservlet.ErrorObject

public final class ErrorObject
extends java.lang.Object

An error object for the Velocity context.

Version:
$Revision: 60778 $

Constructor Summary
ErrorObject()
           
 
Method Summary
 java.lang.Throwable getCauseOfType(java.lang.String p_strExceptionClass)
          Get the first error cause of the given type.
 java.lang.Throwable getError()
          Get the error hold by this object.
 boolean hasError()
          Check if this error object holds an error.
 boolean isCausedBy(java.lang.String p_strExceptionClass)
          Check if the error is or is caused by an exception of the given type.
 boolean isCausedByAccessControlException()
          Check if the error is or is caused by a java.security.AccessControlException.
 boolean isSilentMode()
          Returns true, if all errors should be suppressed.
 void setError(java.lang.Throwable p_error)
          Put an error into this error object.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ErrorObject

public ErrorObject()
Method Detail

hasError

public boolean hasError()
Check if this error object holds an error.

Returns:
true if this error object holds an error, or false otherwise.

isCausedBy

public boolean isCausedBy(java.lang.String p_strExceptionClass)
                   throws java.lang.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:
true if this error object holds an error that is caused by the given exception type, or false otherwise.
Throws:
java.lang.ClassNotFoundException - - If p_strExceptionClass is not found.
See Also:
ExceptionUtil.isCausedBy(Throwable, String)

getCauseOfType

public java.lang.Throwable getCauseOfType(java.lang.String p_strExceptionClass)
                                   throws java.lang.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 null if no such cause could be found.
Throws:
java.lang.ClassNotFoundException - - If p_strExceptionClass is not found.

isCausedByAccessControlException

public boolean isCausedByAccessControlException()
Check if the error is or is caused by a java.security.AccessControlException.

Returns:
true if this error object holds an error that is caused by a java.security.AccessControlException, or false otherwise.

getError

public java.lang.Throwable getError()
Get the error hold by this object.

Returns:
The error, or null if hasError() is false.

isSilentMode

public boolean isSilentMode()
Returns true, if all errors should be suppressed.

Returns:
true if the error should be suppressed.

setError

public void setError(java.lang.Throwable p_error)
Put an error into this error object.

Parameters:
p_error - The error to be set.


Last updated: 2011-01-27
Copyright 2000-2010 United Planet. All Rights Reserved.