Overview | Package | Class | Tree | Deprecated | Index | Help
| SolarMetric Kodo JDO 2.5.8 generated on January 11 2004
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.solarmetric.kodo.impl.jdbc.runtime
Class SQLExceptions

    java.lang.Object
      |
      +--com.solarmetric.kodo.impl.jdbc.runtime.SQLExceptions

public class SQLExceptions
extends Object

Utility class for obtaining an array of Throwable[] objects from a SQLException.

Constructor Summary
`SQLExceptions()`

Method Summary
`static Throwable[]` | `exceptions(Throwable t)`
`static JDOException` | `handle(Exception ex, boolean fatal)` Handle the specified exception.
`static JDODataStoreException` | `throwDataStore(SQLException e)`
`static JDOFatalDataStoreException` | `throwFatal(SQLException e)`

Methods inherited from class java.lang.Object
`, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### SQLExceptions

    public SQLExceptions()

Method Detail

### handle

    public static JDOException handle(Exception ex,
                                      boolean fatal)

  Handle the specified exception. It works with the following heuristic:
  - if ex is a JDOException, it will be returned unmodified
  - if ex is a SQLException, it will be wrapped in a either a `FatalDataStoreException` or a `DataStoreException`, depending on whether the fatal flag is true
  - otherwise, it will be wrapped in either a `FatalException` or a `UserException`, depending on the value of the fatal flag.
  Parameters:
    `ex` - the Exception to handle
    `fatal` - whether the exception will be fatal or not
  Returns:
    the JDOException in which the exception is wrapped

### throwFatal

    public static JDOFatalDataStoreException throwFatal(SQLException e)

### throwDataStore

    public static JDODataStoreException throwDataStore(SQLException e)

### exceptions

    public static Throwable[] exceptions(Throwable t)

Overview | Package | Class | Tree | Deprecated | Index | Help
| SolarMetric Kodo JDO 2.5.8 generated on January 11 2004
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright 2001,2002,2003 SolarMetric, Inc. All Rights Reserved.