Overview Package Class Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

ptolemy.moml
Class StreamErrorHandler

java.lang.Object
 extended byptolemy.moml.StreamErrorHandler
All Implemented Interfaces:
ErrorHandler

public class StreamErrorHandler
extends java.lang.Object
implements ErrorHandler

Basic error handler for the MoMLParser class. This error handler reports errors to a stream or to standard error, and requests that parsing continue.

Since:
Ptolemy II 2.0
Version:
$Id: StreamErrorHandler.java,v 1.24 2006年03月29日 00:03:05 cxh Exp $
Author:
Edward A. Lee
See Also:
MoMLParser
Accepted Rating:
Red (reviewmoderator)
Proposed Rating:
Red (eal)

Field Summary
Fields inherited from interface ptolemy.moml.ErrorHandler
CANCEL, CONTINUE, RETHROW
Constructor Summary
StreamErrorHandler()
Create an error handler that sends messages to the standard error.
StreamErrorHandler(java.io.OutputStream out)
Create an error handler that sends messages to the specified stream.
Method Summary
void enableErrorSkipping(boolean enable)
Enable or disable skipping of errors.
int handleError(java.lang.String element, NamedObj context, java.lang.Throwable exception)
Handle an error by printing a description of the error to the stream specified in the constructor.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

StreamErrorHandler

public StreamErrorHandler()
Create an error handler that sends messages to the standard error.


StreamErrorHandler

public StreamErrorHandler(java.io.OutputStream out)
Create an error handler that sends messages to the specified stream.

Parameters:
out - The OutputStream
Method Detail

enableErrorSkipping

public void enableErrorSkipping(boolean enable)
Enable or disable skipping of errors. This method does nothing.

Specified by:
enableErrorSkipping in interface ErrorHandler
Parameters:
enable - True to enable skipping, false to disable.

handleError

public int handleError(java.lang.String element,
 NamedObj context,
 java.lang.Throwable exception)
Handle an error by printing a description of the error to the stream specified in the constructor.

Specified by:
handleError in interface ErrorHandler
Parameters:
element - The XML element that triggered the error.
context - The container object for the element.
exception - The exception that was thrown.
Returns:
CONTINUE to request skipping this element.

Overview Package Class Tree Deprecated Index Help
PREV CLASS NEXT CLASS FRAMES NO FRAMES All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

AltStyle によって変換されたページ (->オリジナル) /