org.patterncoder
Class ErrorHandler

java.lang.Object
  extended by org.patterncoder.ErrorHandler

public class ErrorHandler
extends java.lang.Object

Handles all errors that are produced by the patterns extension. Provides options to either display a message to the user or log the error into the log file.


Constructor Summary
ErrorHandler()
           
 
Method Summary
static void logErrorMsg(java.lang.String s)
          Logs the message sent to it.
static void printErrorMsg(java.lang.String error)
          Displays an error dialog box to the user, with the specified message.
static void printErrorMsg(java.lang.String error, java.lang.Throwable throwable)
          Displays an error dialog box to the user, with the specified message.
static void printWarningMsg(java.lang.String warning)
          Displays a warning message dialog to the user, with the specified message.
static void printWarningMsg(java.lang.String warning, java.lang.Throwable throwable)
          Displays a warning message dialog to the user, with the specified message.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ErrorHandler

public ErrorHandler()
Method Detail

logErrorMsg

public static void logErrorMsg(java.lang.String s)
Logs the message sent to it. Only does so if the system property "debug", is set to true.

Parameters:
s - Message to log.

printErrorMsg

public static void printErrorMsg(java.lang.String error)
Displays an error dialog box to the user, with the specified message.

Parameters:
error - Messsage to display.

printWarningMsg

public static void printWarningMsg(java.lang.String warning)
Displays a warning message dialog to the user, with the specified message.

Parameters:
warning - Message to display.

printErrorMsg

public static void printErrorMsg(java.lang.String error,
                                 java.lang.Throwable throwable)
Displays an error dialog box to the user, with the specified message.

Parameters:
error - Messsage to display.
throwable - throwable raised by program exception

printWarningMsg

public static void printWarningMsg(java.lang.String warning,
                                   java.lang.Throwable throwable)
Displays a warning message dialog to the user, with the specified message.

Parameters:
warning - Message to display.
throwable - throwable raised by program exception