nl.uva.vlet.exception
Class VlException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by nl.uva.vlet.exception.VlException
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
AttributeNotEditableException, AuthenticationException, InitializationException, InterfaceMismatchException, LinkTargetException, NotEditableException, NotImplementedException, ResourceException, ServiceTypeMismatchException, VlInterruptedException, VlIOException, VlServerException, VlURISyntaxException

public class VlException
extends java.lang.Exception

Super class of all VL Exceptions.

The Class VlException provides more high-level information about the Exception which occured and hides the original System Exception.

This reduces the stack trace for example and provides the end-user (or application programmer) a better descriptive error message then the low level System Exception (which might be unknown to the application programmer).


Example of Usage:

  • thrown new VlException("Unknown Exception.");
  • thrown new VlException(ReadAccesDeniedException);
  • thrown new VlException(ReadAccesDeniedException,"File has wrong group permissions.");
  • thrown new VlException(ReadAccesDeniedException,"Message txt",e);

    See Also:
    Serialized Form

    Field Summary
    protected  java.lang.String name
              Human Readable Name of the Exception
     
    Constructor Summary
    protected VlException()
              Default contructor.
      VlException(java.lang.String name)
              Most basic implementation of the VlException.
      VlException(java.lang.String name, java.lang.String message)
              Public constructor to split name of exception and the exception message.
      VlException(java.lang.String name, java.lang.String message, java.lang.Throwable cause)
              Public constructor to split name of exception and the exception message.
      VlException(java.lang.String name, java.lang.Throwable cause)
              Public constructor which holds original system exception.
      VlException(java.lang.Throwable cause)
              Default contructor which holds system exception.
     
    Method Summary
    static java.lang.String getChainedStackTraceText(java.lang.Exception e)
              Return the stacktrace, including nested Exceptions ! as single String
     java.lang.String getName()
              Returns Name of VlException.
    static VlException newChainedException(java.lang.Exception e)
               
     java.lang.String toString()
              For printing purposes.
     
    Methods inherited from class java.lang.Throwable
    fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
     
    Methods inherited from class java.lang.Object
    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
     

    Field Detail

    name

    protected java.lang.String name
    Human Readable Name of the Exception

    Constructor Detail

    VlException

    protected VlException()
    Default contructor. For subclasses only.


    VlException

    public VlException(java.lang.Throwable cause)
    Default contructor which holds system exception. For subclasses only.


    VlException

    public VlException(java.lang.String name)
    Most basic implementation of the VlException.


    VlException

    public VlException(java.lang.String name,
                       java.lang.Throwable cause)
    Public constructor which holds original system exception.


    VlException

    public VlException(java.lang.String name,
                       java.lang.String message)
    Public constructor to split name of exception and the exception message.


    VlException

    public VlException(java.lang.String name,
                       java.lang.String message,
                       java.lang.Throwable cause)
    Public constructor to split name of exception and the exception message. Exception holds original (java) exception also.

    Method Detail

    toString

    public java.lang.String toString()
    For printing purposes.

    Overrides:
    toString in class java.lang.Throwable

    getName

    public java.lang.String getName()
    Returns Name of VlException. Typically this is the name of the subclass.


    getChainedStackTraceText

    public static java.lang.String getChainedStackTraceText(java.lang.Exception e)
    Return the stacktrace, including nested Exceptions ! as single String


    newChainedException

    public static VlException newChainedException(java.lang.Exception e)