Package com.sleepycat.bdb.util

Examples of com.sleepycat.bdb.util.RuntimeExceptionWrapper


    public void testRuntimeWrapper()
        throws Exception {

        try {
            throw new RuntimeExceptionWrapper(new IOException("msg"));
        } catch (RuntimeException e) {
            Exception ee = ExceptionUnwrapper.unwrap(e);
            assertTrue(ee instanceof IOException);
            assertEquals("msg", ee.getMessage());
View Full Code Here


    public void testErrorWrapper()
        throws Exception {

        try {
            throw new RuntimeExceptionWrapper(new Error("msg"));
        } catch (RuntimeException e) {
            try {
                ExceptionUnwrapper.unwrap(e);
                fail();
            } catch (Error ee) {
View Full Code Here

            write(id);
        } catch (IOException e) {
            // do not throw IOException from here since ObjectOutputStream
            // will write the exception to the stream, which causes another
            // call here, etc.
            throw new RuntimeExceptionWrapper(e);
        } catch (ClassNotFoundException e) {
            throw new RuntimeExceptionWrapper(e);
        }
    }
View Full Code Here

            return classCatalog.getClassFormat(id);
        } catch (IOException e) {
            // do not throw IOException from here since ObjectOutputStream
            // will write the exception to the stream, which causes another
            // call here, etc.
            throw new RuntimeExceptionWrapper(e);
        }
    }
View Full Code Here

                if (currentTxn.getTxn() == null) {
                    currentTxn.beginTxn();
                    return true;
                }
            } catch (DbException e) {
                throw new RuntimeExceptionWrapper(e);
            }
        }
        return false;
    }
View Full Code Here

    static RuntimeException convertException(Exception e) {

        if (e instanceof RuntimeException) {
            return (RuntimeException) e;
        } else {
            return new RuntimeExceptionWrapper(e);
        }
    }
View Full Code Here

                // abort ONE
                assertNull(currentTxn.abortTxn());
                assertNull(currentTxn.getTxn());
            } catch (Exception e) {
                throw new RuntimeExceptionWrapper(e);
            }
        }
View Full Code Here

                        // commit TWO
                    }
                });
                assertNull(currentTxn.getTxn());
            } catch (Exception e) {
                throw new RuntimeExceptionWrapper(e);
            }
        }
View Full Code Here

            if (env.isCdbMode()) {
                this.cdbContext = new ThreadLocal();
                this.cdbContext.set(new CdbThreadContext(this));
            }
        } catch (DbException e) {
            throw new RuntimeExceptionWrapper(e);
        }
    }
View Full Code Here

    public final boolean isAutoCommit() {

        try {
            return (dbEnv.getFlags() & Db.DB_AUTO_COMMIT) != 0;
        } catch (DbException e) {
            throw new RuntimeExceptionWrapper(e);
        }
    }
View Full Code Here

TOP

Related Classes of com.sleepycat.bdb.util.RuntimeExceptionWrapper

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.