FileDocCategorySizeDatePackage
InternalErrorHandler.javaAPI DocphoneME MR2 API (J2ME)2215Wed May 02 18:00:42 BST 2007gov.nist.core

InternalErrorHandler

public class InternalErrorHandler extends Object
Handles Internal error failures and prints a stack trace (for debugging).
version
JAIN-SIP-1.1 This code is in the public domain.

Fields Summary
Constructors Summary
Methods Summary
public static voidhandleException(java.lang.Exception ex)
Handles an unexpected exception.

param
ex exception to be processed

        try {
            throw ex;
        } catch (Exception e) {
            System.err.println("Unexpected exception : " + e);
            System.err.println("Error message is " + ex.getMessage());
            System.err.println("*************Stack Trace ************");
            e.printStackTrace();
            System.exit(0);
        }
    
public static voidhandleException(java.lang.String emsg)
Handles an unexpected condition (and print the error code).

param
emsg message text for the exception

        try {
            throw new Exception(emsg);
        } catch (Exception ex) {
            ex.printStackTrace();
            System.exit(0);
        }