org.graphdrawing.graphml.writer
Interface GraphMLWriteErrorHandler


public interface GraphMLWriteErrorHandler

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


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

Method Detail

error

public void error(Object location,
                  String message,
                  Exception e,
                  GraphMLWriteContext context)
           throws GraphMLWriteException
Handles an error message that originates from the writer 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 write context when the error occured
Throws:
GraphMLWriteException - propagated or new exception that notifies callers of this error

fatal

public void fatal(Object location,
                  String message,
                  Exception e,
                  GraphMLWriteContext context)
           throws GraphMLWriteException
Handles an FATAL error message that originates from the writer 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 write context when the error occured
Throws:
GraphMLWriteException - propagated or new exception that notifies callers of this error

warning

public void warning(Object location,
                    String message,
                    Exception e,
                    GraphMLWriteContext context)
Handles an warning message that originates from the writer 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 write context when the error occured


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