org.apache.commons.latka
Class LatkaException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by org.apache.commons.latka.LatkaException
All Implemented Interfaces:
Serializable

public class LatkaException
extends 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  Exception _wrappedException
          The original exception
 
Constructor Summary
LatkaException(Exception e)
          Wrapped exception.
LatkaException(String message)
          Standard exception constructor
 
Method Summary
 Exception getException()
          Get a wrapped exception
 void printStackTrace()
          provide wrapped exception details
 void printStackTrace(PrintStream s)
          provide wrapped exception details
 void printStackTrace(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 Exception _wrappedException
The original exception

Constructor Detail

LatkaException

public LatkaException(String message)
Standard exception constructor

Parameters:
message - some text explaining the exception

LatkaException

public LatkaException(Exception e)
Wrapped exception.

Parameters:
e - exception to wrap
Method Detail

getException

public 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

Overrides:
printStackTrace in class Throwable

printStackTrace

public void printStackTrace(PrintStream s)
provide wrapped exception details

Overrides:
printStackTrace in class Throwable
Parameters:
s - PrintStream to print to

printStackTrace

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

Overrides:
printStackTrace in class Throwable
Parameters:
s - the print writer to send output to


Copyright © 2001-2010 The Apache Software Foundation. All Rights Reserved.