org.apache.derby.iapi.error
Class ExceptionUtil

java.lang.Object
  extended by org.apache.derby.iapi.error.ExceptionUtil

public class ExceptionUtil
extends java.lang.Object

This class provides utility routines for exceptions


Constructor Summary
ExceptionUtil()
           
 
Method Summary
static java.lang.String dumpThreads()
          Dumps stack traces for all the threads if the JVM supports it.
static int getSeverityFromIdentifier(java.lang.String messageID)
          Get the severity given a message identifier from SQLState.
static java.lang.String getSQLStateFromIdentifier(java.lang.String messageID)
          Convert a message identifier from org.apache.derby.shared.common.reference.SQLState to a SQLState five character string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExceptionUtil

public ExceptionUtil()
Method Detail

getSQLStateFromIdentifier

public static java.lang.String getSQLStateFromIdentifier(java.lang.String messageID)
Convert a message identifier from org.apache.derby.shared.common.reference.SQLState to a SQLState five character string.

Parameters:
messageID - - the sql state id of the message from Derby
Returns:
String - the 5 character code of the SQLState ID to returned to the user

getSeverityFromIdentifier

public static int getSeverityFromIdentifier(java.lang.String messageID)
Get the severity given a message identifier from SQLState.


dumpThreads

public static java.lang.String dumpThreads()
Dumps stack traces for all the threads if the JVM supports it. The result is returned as a string, ready to print. If the JVM doesn't have the method Thread.getAllStackTraces i.e, we are on a JVM < 1.5, or if we don't have the permissions: java.lang.RuntimePermission "getStackTrace" and "modifyThreadGroup", a message saying so is returned instead.

Returns:
stack traces for all live threads as a string or an error message.

Built on Wed 2013-06-12 15:21:56+0000, from revision ???

Apache Derby V10.10 Internals - Copyright © 2004,2013 The Apache Software Foundation. All Rights Reserved.