org.apache.commons.latka
Class LatkaException

java.lang.Object
  extended byjava.lang.Throwable
      extended byjava.lang.Exception
          extended byorg.apache.commons.latka.LatkaException
All Implemented Interfaces:
java.io.Serializable

public class LatkaException
extends java.lang.Exception

Latka throws this exception to the client whenever a problem occurs that is not covered by one of the standard JDK exceptions (validation errors, SAX problems, etc.)

Version:
$Id: LatkaException.java 155424 2005-02-26 13:09:29Z dirkv $
Author:
Morgan Delagrange, dIon Gillard
See Also:
Serialized Form

Field Summary
protected  java.lang.Exception _wrappedException
          The original exception
 
Constructor Summary
LatkaException(java.lang.Exception e)
          Wrapped exception.
LatkaException(java.lang.String message)
          Standard exception constructor
 
Method Summary
 java.lang.Exception getException()
          Get a wrapped exception
 void printStackTrace()
          provide wrapped exception details
 void printStackTrace(java.io.PrintStream s)
          provide wrapped exception details
 void printStackTrace(java.io.PrintWriter s)
          Print wrapped exception details, if any
static void printWrappedExceptions(LatkaException e)
          Print a wrapped exception to stdout and, in the case of SAXExceptions, an additional wrapped exception.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

_wrappedException

protected java.lang.Exception _wrappedException
The original exception

Constructor Detail

LatkaException

public LatkaException(java.lang.String message)
Standard exception constructor

Parameters:
message - some text explaining the exception

LatkaException

public LatkaException(java.lang.Exception e)
Wrapped exception.

Parameters:
e - exception to wrap
Method Detail

getException

public java.lang.Exception getException()
Get a wrapped exception

Returns:
a wrapped exception, or null if no wrapped exception exists.

printWrappedExceptions

public static void printWrappedExceptions(LatkaException e)
Print a wrapped exception to stdout and, in the case of SAXExceptions, an additional wrapped exception. This method does _not_ print the exception's message itself.

Parameters:
e - LatkaException with wrapped messages.

printStackTrace

public void printStackTrace()
provide wrapped exception details


printStackTrace

public void printStackTrace(java.io.PrintStream s)
provide wrapped exception details

Parameters:
s - PrintStream to print to

printStackTrace

public void printStackTrace(java.io.PrintWriter s)
Print wrapped exception details, if any

Parameters:
s - the print writer to send output to


Copyright © 2002-2007 The Apache Software Foundation. All Rights Reserved.