Package org.web3d.x3d.jaxp
Class X3DErrorHandler
java.lang.Object
org.web3d.x3d.jaxp.X3DErrorHandler
- All Implemented Interfaces:
ErrorHandler
Adapter implementation of the SAX ErrorHandler interface that communicates
with our X3D ErrorReporter interface.
Provides marginally better error handling that prints to the nominated output stream. If no stream is provided, it prints to stdout.
- Version:
- $Revision: 1.4 $
- Author:
- Justin Couch
-
Constructor Summary
ConstructorsConstructorDescriptionCreate a new error handler that prints to the standard System.out. -
Method Summary
Modifier and TypeMethodDescriptionvoiderror(SAXParseException spe) Process a non-fatal error exception.voidProcess a non-fatal error exception.voidsetErrorReporter(org.j3d.util.ErrorReporter reporter) Register an error reporter with the manager so that any errors generated by the loading of script code can be reported in a nice, pretty fashion.voidwarning(SAXParseException spe) Process a warning exception.
-
Constructor Details
-
X3DErrorHandler
public X3DErrorHandler()Create a new error handler that prints to the standard System.out.
-
-
Method Details
-
warning
Process a warning exception. Just prints the message out- Specified by:
warningin interfaceErrorHandler- Parameters:
spe- The exception to be processed- Throws:
SAXException- Never thrown
-
error
Process a non-fatal error exception. Prints the message out and re-throws the exception.- Specified by:
errorin interfaceErrorHandler- Parameters:
spe- The exception to be processed- Throws:
SAXException- A wrapped version of the original exception
-
fatalError
Process a non-fatal error exception. Prints the message out and re-throws the exception.- Specified by:
fatalErrorin interfaceErrorHandler- Parameters:
spe- The exception to be processed- Throws:
SAXException- A wrapped version of the original exception
-
setErrorReporter
public void setErrorReporter(org.j3d.util.ErrorReporter reporter) Register an error reporter with the manager so that any errors generated by the loading of script code can be reported in a nice, pretty fashion. Setting a value of null will clear the currently set reporter. If one is already set, the new value replaces the old.- Parameters:
reporter- The instance to use or null
-