|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.acsinet_solutions.util.exception.AbstractExceptionDataWriter
com.acsinet_solutions.util.exception.SimpleExceptionDataWriter
public class SimpleExceptionDataWriter
Simple exception data writer that writes exception info to stdout, specially in environments pre JDK 1.4 where no nested exception facilities were incorporated into the platform.
TODO: This class may be modified to work well with nested facilities in JDK 1.4 and higher to avoid repetetive stack trace reporting.
| Constructor Summary | |
|---|---|
SimpleExceptionDataWriter()
|
|
| Method Summary | |
|---|---|
protected void |
endException()
Exception end |
static java.lang.String |
getStackTrace(java.lang.Throwable throwable)
Get a stack trace |
protected void |
printMessage(java.lang.String message)
Print message for an exception |
static void |
printStackTrace(java.lang.Throwable throwable)
Print a stack trace to system error output |
protected void |
printStackTraceEntry(int line,
java.lang.String entry)
Print an stack trace entry |
protected void |
startException(boolean start)
Exception starts |
java.lang.String |
toString()
Get the data contents |
| Methods inherited from class com.acsinet_solutions.util.exception.AbstractExceptionDataWriter |
|---|
getStop, write |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface com.acsinet_solutions.util.exception.ExceptionDataWriter |
|---|
write |
| Constructor Detail |
|---|
public SimpleExceptionDataWriter()
| Method Detail |
|---|
public static void printStackTrace(java.lang.Throwable throwable)
throwable - A Throwable instance to usepublic static java.lang.String getStackTrace(java.lang.Throwable throwable)
throwable - A Throwable instance to use
protected final void startException(boolean start)
throws java.io.IOException
startException in class AbstractExceptionDataWriterstart - true if this is the first exception; false otherwise
java.io.IOException
protected final void endException()
throws java.io.IOException
endException in class AbstractExceptionDataWriterjava.io.IOException
protected final void printMessage(java.lang.String message)
throws java.io.IOException
printMessage in class AbstractExceptionDataWritermessage - A not-null String instance
java.io.IOException
protected final void printStackTraceEntry(int line,
java.lang.String entry)
throws java.io.IOException
printStackTraceEntry in class AbstractExceptionDataWriterpos - The nonnegative line positionentry - A not-null String instance
java.io.IOExceptionpublic final java.lang.String toString()
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||