com.sas.util.errorhandlers
Class PrintlnErrorHandler

com.sas.util.errorhandlers.PrintlnErrorHandler
All Implemented Interfaces:
ErrorHandlerInterface, GenericErrorHandlerInterface, java.io.Serializable

public class PrintlnErrorHandler
implements ErrorHandlerInterface, GenericErrorHandlerInterface, java.io.Serializable

PrintlnErrorHandler is an error handler which prints the message to System.err or the specified stream when handleError() is called.

See Also:
Serialized Form

Field Summary
protected  java.io.PrintStream printStream
           
 
Constructor Summary
PrintlnErrorHandler()
           
PrintlnErrorHandler(java.io.PrintStream printStream)
           
 
Method Summary
 void handleError(com.sas.ComponentInterface component, com.sas.text.Message message, java.lang.String messageCode)
          handleError should perform whatever action is desired when an error occurs.
 void handleError(java.lang.Object object, com.sas.text.Message message, java.lang.String messageCode)
          handleError should perform whatever action is desired when an error occurs.
 

Field Detail

printStream

protected java.io.PrintStream printStream
Constructor Detail

PrintlnErrorHandler

public PrintlnErrorHandler()

PrintlnErrorHandler

public PrintlnErrorHandler(java.io.PrintStream printStream)
Method Detail

handleError

public void handleError(com.sas.ComponentInterface component,
                        com.sas.text.Message message,
                        java.lang.String messageCode)
Description copied from interface: ErrorHandlerInterface
handleError should perform whatever action is desired when an error occurs. Examples might be displaying a MessageBox, writing a message to the log, or printing a message to a stream.

Specified by:
handleError in interface ErrorHandlerInterface
Parameters:
component - The component on which the error occured.
message - A Message object with formatted with the message to display. The object should also contain the necessary arguments for formatting the message.
messageCode - A non-translatable string which indicates the type of error that occured.

handleError

public void handleError(java.lang.Object object,
                        com.sas.text.Message message,
                        java.lang.String messageCode)
Description copied from interface: GenericErrorHandlerInterface
handleError should perform whatever action is desired when an error occurs. Examples might be displaying a MessageBox, writing a message to the log, or printing a message to a stream.

Specified by:
handleError in interface GenericErrorHandlerInterface
message - A Message object with formatted with the message to display. The object should also contain the necessary arguments for formatting the message.
messageCode - A non-translatable string which indicates the type of error that occured.



Copyright © 2009 SAS Institute Inc. All Rights Reserved.