com.metamatrix.common.util.exception
Class SQLExceptionUnroller

java.lang.Object
  extended by com.metamatrix.common.util.exception.SQLExceptionUnroller

public class SQLExceptionUnroller
extends java.lang.Object

SQLExceptionUnroller.
A utility to unroll a chained SQLException.

This utility is used to replace proprietary exceptions that may not unmarshall in other VMs that do not have the proprietary libraries.

TODO: test causes and next exceptions for non-Java then unroll


Constructor Summary
SQLExceptionUnroller()
           
 
Method Summary
static java.sql.SQLException unRollException(java.sql.SQLException theException)
          Unroll a chain of possibly proprietary SQLExceptions and create a chain of of generic SQLExceptions with the original message (reason), SQLState, and vendorCode of the SQLExceptions in the chain.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SQLExceptionUnroller

public SQLExceptionUnroller()
Method Detail

unRollException

public static java.sql.SQLException unRollException(java.sql.SQLException theException)
Unroll a chain of possibly proprietary SQLExceptions and create a chain of of generic SQLExceptions with the original message (reason), SQLState, and vendorCode of the SQLExceptions in the chain.

Parameters:
theException - The original SQLException possibly with a chain of child exceptions.
Returns:
A SQLException mirroring the original exception chain.


Copyright © 2009. All Rights Reserved.