org.aris.actionservlet
Class ErrorReport

java.lang.Object
  extended by org.aris.actionservlet.ErrorReport

public class ErrorReport
extends java.lang.Object

A class to simplify error reporting.

Author:
Aris

Constructor Summary
ErrorReport()
          Creates a new instance of errorReport
 
Method Summary
static void report(java.io.PrintWriter writer, java.lang.Throwable e)
          Writes the stacktrace of an exception to printwriter.
static java.lang.String reportStr(java.lang.Throwable e)
          Creates a string with the stacktrace of an exception.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ErrorReport

public ErrorReport()
Creates a new instance of errorReport

Method Detail

reportStr

public static java.lang.String reportStr(java.lang.Throwable e)
Creates a string with the stacktrace of an exception.

Parameters:
e - The exception that has been thrown.
Returns:
A string containing the stacktrace.

report

public static void report(java.io.PrintWriter writer,
                          java.lang.Throwable e)
Writes the stacktrace of an exception to printwriter.

Parameters:
writer - The PrintWriter where the output is writen to.
e - The exception thrown.