org.graphdrawing.graphml.reader
Interface GraphMLParseErrorHandler


public interface GraphMLParseErrorHandler

Error handler class to manage errors during the parsing process. This can be used to filter exceptions thrown during the parsing process.


Method Summary
 void error(Object location, String message, Exception e, GraphMLParseContext context)
          Handles an error message that originates from the parser or subordinate classes.
 void fatal(Object location, String message, Exception e, GraphMLParseContext context)
          Handles an FATAL error message that originates from the parser or subordinate classes.
 void warning(Object location, String message, Exception e, GraphMLParseContext context)
          Handles an warning message that originates from the parser or subordinate classes.
 

Method Detail

error

public void error(Object location,
                  String message,
                  Exception e,
                  GraphMLParseContext context)
           throws GraphMLParseException
Handles an error message that originates from the parser or subordinate classes. Usually, this is a severe error condition that cannot be repaired, so this should be used for clean up and reporting, and than a new GraphMLException should be thrown.

Parameters:
location - identifier for the location of the error
message - a descriptive message of the error
e - a reference to an exception, if the error has been caused by catching one
context - the current parse context when the error occured
Throws:
GraphMLParseException - propagated or new exception that notifies callers of this error

fatal

public void fatal(Object location,
                  String message,
                  Exception e,
                  GraphMLParseContext context)
           throws GraphMLParseException
Handles an FATAL error message that originates from the parser or subordinate classes. This is a fatal error condition after wich it is not possible to resume, so this should only be used for clean up and reporting, and than a new GraphMLException or RuntimeException should be thrown.

Parameters:
location - identifier for the location of the error
message - a descriptive message of the error
e - a reference to an exception, if the error has been caused by catching one
context - the current parse context when the error occured
Throws:
GraphMLParseException - propagated or new exception that notifies callers of this error

warning

public void warning(Object location,
                    String message,
                    Exception e,
                    GraphMLParseContext context)
Handles an warning message that originates from the parser or subordinate classes. Usually, this is an error condition that can be repaired. However, the caller is not required to continue after this warning, so all steps to handle the error should be done in the handler.

Parameters:
location - identifier for the location of the error
message - a descriptive message of the error
e - a reference to an exception, if the error has been caused by catching one
context - the current parse context when the error occured


Copyright ©2000-2008, yWorks GmbH. All rights reserved.