edu.wisc.trace.urcsdk.support
Class ErrorHandler

java.lang.Object
  extended by edu.wisc.trace.urcsdk.support.ErrorHandler

public class ErrorHandler
extends java.lang.Object

ErrorHandler is a centralized approach to exception handling within the URC SDK. Anytime there is an error that occurs within the SDK, it should be sent through this error handler to provide a centralized mechanism for consistent error reporting and handling.

Created on: Sep 19, 2004
Known bugs: None
Thread safe: Yes

Version:
$Revision: 1.21 $
Author:
Andrew Martin, Trace R&D Center

Method Summary
static void logError(java.lang.Object thrower, java.lang.String errorMsg)
          logError takes the offending object and an error message and, via the java.util.Logger class, prints a severe error message to the configured output.
static UrcException newException(java.lang.Object thrower, java.lang.String errorMsg)
          newException returns a UrcException with relevant information passed along with it.
static UrcException newException(java.lang.Object thrower, java.lang.String errorMsg, boolean showDialog)
          newException returns a UrcException with relevant information passed along with it.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

logError

public static void logError(java.lang.Object thrower,
                            java.lang.String errorMsg)
logError takes the offending object and an error message and, via the java.util.Logger class, prints a severe error message to the configured output.

Parameters:
thrower - an Object value - the object which caused the error.
errorMsg - a String value - a string indicating the error details.

newException

public static UrcException newException(java.lang.Object thrower,
                                        java.lang.String errorMsg)
newException returns a UrcException with relevant information passed along with it. This version of the method does not provide an error dialog.

Parameters:
thrower - an Object value - the offending object.
errorMsg - a String value - a message detailing the exception.
Returns:
a UrcException value

newException

public static UrcException newException(java.lang.Object thrower,
                                        java.lang.String errorMsg,
                                        boolean showDialog)
newException returns a UrcException with relevant information passed along with it. This version of the method provides an swing error dialog indicating the offending object and the detailed error message.

Parameters:
thrower - an Object value - the offending object.
errorMsg - a String value - a message detailing the exception.
Returns:
a UrcException value


Copyright © 2006 Trace R&D Center, University of Wisconsin-Madison. All Rights Reserved.