MDi JLib
1.7.4

com.microdeveloper.util.exception
Class StackTrace

java.lang.Object
  extended by com.microdeveloper.util.exception.StackTrace

public class StackTrace
extends Object

StackTrace converts an exceptions StackTrace to other formats for output. Because it can convert to a stack trace to a String or send it to other output streams, it can be used in multiple sitations for easy output to web pages, files, etc.

Created Feb 26, 2006, 08:25:03 PM

Since:
1.7.1
Version:
1.0
Author:
MicroDeveloper, Inc.

Constructor Summary
protected StackTrace()
           
 
Method Summary
static void printException(Exception exception, OutputStream stream)
          Print the exception's stack trace to an OutputStream.
static void printException(Exception exception, Writer stream)
          Prints the exception to a Writer stream.
static String toString(Throwable exception)
          Convert an exceptions stack trace to a String.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StackTrace

protected StackTrace()
Method Detail

toString

public static String toString(Throwable exception)
Convert an exceptions stack trace to a String.

Parameters:
exception - the exception to print
Returns:
the stack trace as a String

printException

public static void printException(Exception exception,
                                  OutputStream stream)
Print the exception's stack trace to an OutputStream.

Parameters:
exception - the exception to print
stream - the OutputStream to use

printException

public static void printException(Exception exception,
                                  Writer stream)
Prints the exception to a Writer stream.

Parameters:
exception - the exception to print
stream - the Writer to use

MDi JLib
1.7.4

Copyright©2001-2007 MicroDeveloper, Inc. All Rights Reserved.