j3d.org Code

org.j3d.util
Class DefaultErrorReporter

java.lang.Object
  extended by org.j3d.util.DefaultErrorReporter
All Implemented Interfaces:
ErrorReporter

public class DefaultErrorReporter
extends java.lang.Object
implements ErrorReporter

An implementation of the ErrorReporter interface that just writes everything to System.out.

The default implementation to be used as convenience code for when the end user has not supplied their own instance. By default, any class in this repository that can be given an instance of the handler will use this class, if none are given.

Version:
$Revision: 1.1 $
Author:
Justin Couch

Constructor Summary
DefaultErrorReporter()
          Creates a new, default instance of the reporter
 
Method Summary
 void errorReport(java.lang.String msg, java.lang.Exception e)
          Notification of a recoverable error.
 void fatalErrorReport(java.lang.String msg, java.lang.Exception e)
          Notification of a non-recoverable error that halts the entire system.
static ErrorReporter getDefaultReporter()
          Fetch the common global instance of the reporter.
 void messageReport(java.lang.String msg)
          Notification of an informational message from the system.
 void warningReport(java.lang.String msg, java.lang.Exception e)
          Notification of a warning in the way the system is currently operating.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultErrorReporter

public DefaultErrorReporter()
Creates a new, default instance of the reporter

Method Detail

getDefaultReporter

public static ErrorReporter getDefaultReporter()
Fetch the common global instance of the reporter.

Returns:
The global instance

messageReport

public void messageReport(java.lang.String msg)
Notification of an informational message from the system. For example, it may issue a message when a URL cannot be resolved.

Specified by:
messageReport in interface ErrorReporter
Parameters:
msg - The general message string to report. May be null

warningReport

public void warningReport(java.lang.String msg,
                          java.lang.Exception e)
Notification of a warning in the way the system is currently operating. This is a non-fatal, non-serious error. For example you will get an warning when a value has been set that is out of range.

Specified by:
warningReport in interface ErrorReporter
Parameters:
msg - The text of the message to be displayed
e - The exception that caused this warning. May be null

errorReport

public void errorReport(java.lang.String msg,
                        java.lang.Exception e)
Notification of a recoverable error. This is a serious, but non-fatal error, for example trying to locate a needed file or system property.

Specified by:
errorReport in interface ErrorReporter
Parameters:
msg - The text of the message to be displayed
e - The exception that caused this warning. May be null

fatalErrorReport

public void fatalErrorReport(java.lang.String msg,
                             java.lang.Exception e)
Notification of a non-recoverable error that halts the entire system. After you recieve this report the runtime system will no longer function - for example a non-recoverable parsing error. The best way out is to reload the file or restart the application internals.

Specified by:
fatalErrorReport in interface ErrorReporter
Parameters:
msg - The text of the message to be displayed
e - The exception that caused this warning. May be null

j3d.org Code

Latest Info from http://code.j3d.org/
Copyright © 2001 - j3d.org