multex
Class Msg

java.lang.Object
  |
  +--multex.Msg

public class Msg
extends java.lang.Object

Services for low-level reporting of any exception.
The destinations can be of types OutputStream, Writer, String, and StringBuffer.
The exception can be


The output can be of the type
You can use no or static internationalization by MsgText.setInternationalization(boolean), or dynamic internationalization by passing the corresponding java.util.ResourceBundle at each invocation of a get- or print-method.

MulTEx 5: Parameter i_lineSeparator removed from all methods. If you miss this possibility for creating HTML output with <BR> as line separator, then betterly consider enclosing the output with <PRE><FONT FACE="Times"> ... </FONT></PRE> This is a much cheaper way to separate the lines of a message chain or a stack trace.

Author:
Christoph Knabe, Berlin, Copyright 1999-2003

Field Summary
static java.lang.String stackTraceFollows
          The String used to separate the message chain of an exception from the stack trace of it.
 
Method Summary
static java.lang.String getMessages(java.lang.Throwable i_throwable)
          Returns the message texts of i_throwable and its chained causing exceptions.
static java.lang.String getReport(java.lang.Throwable i_throwable)
          Returns the report of i_throwable and its chained causing exceptions.
static java.lang.String getStackTrace(java.lang.Throwable i_throwable)
          Returns the compactified stack trace of i_throwable and its chained causing Throwable exceptions.
static void printMessages(java.io.PrintStream io_destination, java.lang.Throwable i_throwable)
          Reports the message texts of i_throwable and its chained causing exceptions to io_destination
static void printMessages(java.io.PrintWriter io_destination, java.lang.Throwable i_throwable)
          Reports the message texts of i_throwable and its chained causing exceptions to io_destination
static void printMessages(java.lang.StringBuffer io_destination, java.lang.Throwable i_throwable)
          Appends the message texts of i_throwable and its chained causing exceptions to io_destination using static internationalization.
static void printMessages(java.lang.StringBuffer io_destination, java.lang.Throwable i_throwable, java.util.ResourceBundle i_resourceBundle)
          Prints the message texts of i_throwable and its chained causing exceptions, detail description here.
static void printMessages(java.lang.Throwable i_throwable)
          Reports the message texts of i_throwable and its chained causing exceptions to System.err
static void printReport(java.io.PrintStream io_destination, java.lang.Throwable i_throwable)
          Reports i_throwable and its chained causing exceptions to io_destination
static void printReport(java.io.PrintWriter io_destination, java.lang.Throwable i_throwable)
          Reports i_throwable and its chained causing exceptions to io_destination
static void printReport(java.lang.StringBuffer io_destination, java.lang.Throwable i_throwable)
          Reports i_throwable and its chained causing exceptions to io_destination
static void printReport(java.lang.StringBuffer io_destination, java.lang.Throwable i_throwable, java.util.ResourceBundle i_resourceBundle)
          Reports i_throwable and its chained causing exceptions to io_destination, detail description here.
static void printReport(java.lang.Throwable i_throwable)
          Reports i_throwable and its chained causing exceptions to System.err
static void printStackTrace(java.io.PrintStream io_destination, java.lang.Throwable i_throwable)
          Prints the compactified stack trace of i_throwable and its chained causing Throwable exceptions to io_destination.
static void printStackTrace(java.io.PrintWriter io_destination, java.lang.Throwable i_throwable)
          Prints the compactified stack trace of i_throwable and its chained causing Throwable exceptions to io_destination.
static void printStackTrace(java.lang.StringBuffer io_destination, java.lang.Throwable i_throwable)
          Prints the compactified stack trace of i_throwable and all its chained causing Throwable exceptions appending it to io_destination, detail description here.
static void printStackTrace(java.lang.Throwable i_throwable)
          Prints the compactified stack trace of i_throwable and its chained causing Throwable exceptions to System.err.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

stackTraceFollows

public static java.lang.String stackTraceFollows
The String used to separate the message chain of an exception from the stack trace of it.

Method Detail

printReport

public static void printReport(java.lang.Throwable i_throwable)
Reports i_throwable and its chained causing exceptions to System.err

See Also:
printReport(StringBuffer,Throwable)

printReport

public static void printReport(java.io.PrintStream io_destination,
                               java.lang.Throwable i_throwable)
Reports i_throwable and its chained causing exceptions to io_destination

See Also:
printReport(StringBuffer,Throwable)

printReport

public static void printReport(java.io.PrintWriter io_destination,
                               java.lang.Throwable i_throwable)
Reports i_throwable and its chained causing exceptions to io_destination

See Also:
printReport(StringBuffer,Throwable,ResourceBundle)

printReport

public static void printReport(java.lang.StringBuffer io_destination,
                               java.lang.Throwable i_throwable)
Reports i_throwable and its chained causing exceptions to io_destination

See Also:
printReport(StringBuffer,Throwable,ResourceBundle)

printReport

public static void printReport(java.lang.StringBuffer io_destination,
                               java.lang.Throwable i_throwable,
                               java.util.ResourceBundle i_resourceBundle)
Reports i_throwable and its chained causing exceptions to io_destination, detail description here. Reports the message chain of i_throwable by printMessages(StringBuffer,Throwable,ResourceBundle) and the stack trace of i_throwable by printStackTrace(StringBuffer,Throwable).

Parameters:
io_destination - Where to append the message chain, must not be null.
i_throwable - The exception, which has to be reported along with its causal chain, must not be null.
i_resourceBundle - Where the messsage text patterns and the Locale are taken from. May be null. See at printMessages(StringBuffer,Throwable,ResourceBundle).

getReport

public static java.lang.String getReport(java.lang.Throwable i_throwable)
Returns the report of i_throwable and its chained causing exceptions.

See Also:
printReport(StringBuffer,Throwable)

printMessages

public static void printMessages(java.lang.Throwable i_throwable)
Reports the message texts of i_throwable and its chained causing exceptions to System.err

See Also:
printMessages(StringBuffer,Throwable)

printMessages

public static void printMessages(java.io.PrintStream io_destination,
                                 java.lang.Throwable i_throwable)
Reports the message texts of i_throwable and its chained causing exceptions to io_destination

See Also:
printMessages(StringBuffer,Throwable)

printMessages

public static void printMessages(java.io.PrintWriter io_destination,
                                 java.lang.Throwable i_throwable)
Reports the message texts of i_throwable and its chained causing exceptions to io_destination

See Also:
printMessages(StringBuffer,Throwable)

getMessages

public static java.lang.String getMessages(java.lang.Throwable i_throwable)
Returns the message texts of i_throwable and its chained causing exceptions.

See Also:
printMessages(StringBuffer,Throwable)

printMessages

public static void printMessages(java.lang.StringBuffer io_destination,
                                 java.lang.Throwable i_throwable)
Appends the message texts of i_throwable and its chained causing exceptions to io_destination using static internationalization.

See Also:
printMessages(StringBuffer,Throwable,ResourceBundle)

printMessages

public static void printMessages(java.lang.StringBuffer io_destination,
                                 java.lang.Throwable i_throwable,
                                 java.util.ResourceBundle i_resourceBundle)
Prints the message texts of i_throwable and its chained causing exceptions, detail description here. Reports the parameterized textual message of i_throwable, or if the message pattern is not available, the name and parameters of i_throwable. Reports the same for each in the chain of the eventually existing causing Throwable exceptions. The concept of chaining causing exceptions is described in the class Failure.

Note MulTEx 5: Parameter i_lineSeparator removed. Always uses the platform default. See discussion in the description of class Msg.

Parameters:
io_destination - Where to append the message chain, must not be null.
i_throwable - The exception, which has to be reported along with its causal chain, must not be null.
i_resourceBundle - Where the messsage text patterns are taken from. The Locale is taken from this i_resourceBundle, too. If null, falls back to static or no internationalization, depending on the actual state of @{link MsgText}.
Since:
MulTEx 5 (2003-09-10) with dynamic internationalization, but without line separator.

printStackTrace

public static void printStackTrace(java.lang.Throwable i_throwable)
Prints the compactified stack trace of i_throwable and its chained causing Throwable exceptions to System.err.

See Also:
printStackTrace(StringBuffer,Throwable)

printStackTrace

public static void printStackTrace(java.io.PrintStream io_destination,
                                   java.lang.Throwable i_throwable)
Prints the compactified stack trace of i_throwable and its chained causing Throwable exceptions to io_destination.

See Also:
printStackTrace(StringBuffer,Throwable)

printStackTrace

public static void printStackTrace(java.io.PrintWriter io_destination,
                                   java.lang.Throwable i_throwable)
Prints the compactified stack trace of i_throwable and its chained causing Throwable exceptions to io_destination.

See Also:
printStackTrace(StringBuffer,Throwable)

getStackTrace

public static java.lang.String getStackTrace(java.lang.Throwable i_throwable)
Returns the compactified stack trace of i_throwable and its chained causing Throwable exceptions.

See Also:
printStackTrace(StringBuffer,Throwable)

printStackTrace

public static void printStackTrace(java.lang.StringBuffer io_destination,
                                   java.lang.Throwable i_throwable)
Prints the compactified stack trace of i_throwable and all its chained causing Throwable exceptions appending it to io_destination, detail description here. All redundant location lines in the stack traces therein are suppressed. Note MulTEx 5: Parameter i_lineSeparator removed. Always uses the platform default. See discussion in the description of class Msg.

Parameters:
io_destination - Where to append the compactified stack trace.
i_throwable - The exception to report, possibly containing a chain of nested cause exceptions.