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 Details

    • ErrorObject

      public ErrorObject()
  • Method Details

    • 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(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:
      true if this error object holds an error that is caused by the given exception type, or false otherwise.
      Throws:
      ClassNotFoundException - - If p_strExceptionClass is 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 null if no such cause could be found.
      Throws:
      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 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(Throwable p_error)
      Put an error into this error object.
      Parameters:
      p_error - The error to be set.