org.apertereports.common.exception
Class ARRuntimeException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by org.apertereports.common.exception.ARRuntimeException
All Implemented Interfaces:
Serializable

public class ARRuntimeException
extends RuntimeException

Unchecked exception used to propagate errors and handle them in higher level layers.

See Also:
Serialized Form

Constructor Summary
ARRuntimeException(ARConstants.ErrorCode errorCode)
          Creates new AR runtime exception
ARRuntimeException(ARConstants.ErrorCode errorCode, String... details)
          Creates new AR runtime exception
ARRuntimeException(ARConstants.ErrorCode errorCode, Throwable cause)
          Creates new AR runtime exception
ARRuntimeException(ARConstants.ErrorCode errorCode, Throwable cause, String... details)
          Creates new AR runtime exception
ARRuntimeException(ARException e)
          Wraps checked exception (business error).
ARRuntimeException(Exception e)
          Wraps unknown error.
 
Method Summary
 ARConstants.ErrorCode getErrorCode()
          Returns error code.
 String[] getErrorDetails()
          Returns error details
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ARRuntimeException

public ARRuntimeException(ARConstants.ErrorCode errorCode)
Creates new AR runtime exception

Parameters:
errorCode - Error code

ARRuntimeException

public ARRuntimeException(ARConstants.ErrorCode errorCode,
                          String... details)
Creates new AR runtime exception

Parameters:
errorCode - Error code
details - Error details

ARRuntimeException

public ARRuntimeException(ARConstants.ErrorCode errorCode,
                          Throwable cause,
                          String... details)
Creates new AR runtime exception

Parameters:
errorCode - Error code
cause - Cause
details - Error details

ARRuntimeException

public ARRuntimeException(ARConstants.ErrorCode errorCode,
                          Throwable cause)
Creates new AR runtime exception

Parameters:
errorCode - Error code
cause - Cause

ARRuntimeException

public ARRuntimeException(ARException e)
Wraps checked exception (business error).

Parameters:
e - Exception

ARRuntimeException

public ARRuntimeException(Exception e)
Wraps unknown error.

Parameters:
e - Exception
Method Detail

getErrorCode

public ARConstants.ErrorCode getErrorCode()
Returns error code. If the code was not set by the constructor, then ARConstants.ErrorCode.UNKNOWN is returned

Returns:
Error code

getErrorDetails

public String[] getErrorDetails()
Returns error details

Returns:
Error details


Copyright © 2011-2013. All Rights Reserved.