VLab Common 1.2

pl.psnc.vlab.exception
Class AbstractException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by pl.psnc.vlab.exception.AbstractException
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
ResourceNotFoundException, VlabException

public abstract class AbstractException
extends java.lang.Exception

AbstractException class - abstract class represents a generic exception

Author:
Dominik Stoklosa (~osa~)
See Also:
Serialized Form
Email address
osa@man.poznan.pl

Constructor Summary
AbstractException(java.lang.Integer errorCode)
          Creates a new AbstractException with error code specified
AbstractException(java.lang.Integer errorCode, java.lang.Exception sourceExc)
          Creates a new AbstractException with error code and source exception specified
AbstractException(java.lang.Integer errorCode, java.lang.String message)
          Creates a new AbstractException with error code and error message specified
AbstractException(java.lang.Integer errorCode, java.lang.String message, java.lang.Exception sourceExc)
          Creates a new AbstractException with error code, error message and source exception specified
AbstractException(java.lang.Integer errorCode, java.lang.String message, java.lang.String[] msgArguments)
          Creates a new AbstractException with error code and error message specified
AbstractException(java.lang.Integer errorCode, java.lang.String message, java.lang.String[] msgArguments, java.lang.Exception sourceExc)
          Creates a new AbstractException with error code, error message and source exception specified
 
Method Summary
abstract  java.lang.String getBundle()
          Get bundle with the i18n keys for the given exception
 int getErrorCode()
          Returns error code of this exception
 java.lang.String getLocalizedMessage()
           
 java.lang.String[] getMsgArguments()
          Get list of values for formated message
 void printStackTrace()
           
 void printStackTrace(java.io.PrintStream printStream)
           
 void printStackTrace(java.io.PrintWriter printWriter)
           
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getMessage, getStackTrace, initCause, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AbstractException

public AbstractException(java.lang.Integer errorCode)
Creates a new AbstractException with error code specified

Parameters:
errorCode - error code

AbstractException

public AbstractException(java.lang.Integer errorCode,
                         java.lang.Exception sourceExc)
Creates a new AbstractException with error code and source exception specified

Parameters:
errorCode - error code
sourceExc - source exception, which caused this event

AbstractException

public AbstractException(java.lang.Integer errorCode,
                         java.lang.String message)
Creates a new AbstractException with error code and error message specified

Parameters:
errorCode - error code
message - error message

AbstractException

public AbstractException(java.lang.Integer errorCode,
                         java.lang.String message,
                         java.lang.String[] msgArguments)
Creates a new AbstractException with error code and error message specified

Parameters:
errorCode - error code
message - error message
msgArguments - formatted message arguments

AbstractException

public AbstractException(java.lang.Integer errorCode,
                         java.lang.String message,
                         java.lang.Exception sourceExc)
Creates a new AbstractException with error code, error message and source exception specified

Parameters:
errorCode - error code
message - error message
sourceExc - source exception, which caused this event

AbstractException

public AbstractException(java.lang.Integer errorCode,
                         java.lang.String message,
                         java.lang.String[] msgArguments,
                         java.lang.Exception sourceExc)
Creates a new AbstractException with error code, error message and source exception specified

Parameters:
errorCode - error code
message - error message
msgArguments - formatted message arguments
sourceExc - source exception, which caused this event
Method Detail

getBundle

public abstract java.lang.String getBundle()
Get bundle with the i18n keys for the given exception

Returns:
bundle name for the given exception

getLocalizedMessage

public java.lang.String getLocalizedMessage()
Overrides:
getLocalizedMessage in class java.lang.Throwable

printStackTrace

public void printStackTrace()
Overrides:
printStackTrace in class java.lang.Throwable

printStackTrace

public void printStackTrace(java.io.PrintStream printStream)
Overrides:
printStackTrace in class java.lang.Throwable

printStackTrace

public void printStackTrace(java.io.PrintWriter printWriter)
Overrides:
printStackTrace in class java.lang.Throwable

getErrorCode

public int getErrorCode()
Returns error code of this exception

Returns:
exception error code

getMsgArguments

public java.lang.String[] getMsgArguments()
Get list of values for formated message

Returns:
list of values for formated message

VLab Common 1.2

Copyright 2004 by VLAB Dominik Stoklosa.