Examples of RuntimeExceptionWrapper


Examples of com.sleepycat.util.RuntimeExceptionWrapper

                        new ByteArrayInputStream(data.getData(),
                                                 data.getOffset(),
                                                 data.getSize()));
                classFormat = (ObjectStreamClass) ois.readObject();
            } catch (IOException e) {
                throw new RuntimeExceptionWrapper(e);
            }

            /* Update the class format map. */

            formatMap.put(classIDObj, classFormat);
View Full Code Here

Examples of com.sleepycat.util.RuntimeExceptionWrapper

            ObjectOutputStream oos;
            try {
                oos = new ObjectOutputStream(baos);
                oos.writeObject(classFormat);
            } catch (IOException e) {
                throw new RuntimeExceptionWrapper(e);
            }
            data.setData(baos.toByteArray());

            cursor.put(key, data);
View Full Code Here

Examples of com.sleepycat.util.RuntimeExceptionWrapper

        // first it sets the transient key fields from the stored key.
        MarshalledTupleEntry obj;
        try {
            obj = (MarshalledTupleEntry) cls.newInstance();
        } catch (IllegalAccessException e) {
            throw new RuntimeExceptionWrapper(e);
        } catch (InstantiationException e) {
            throw new RuntimeExceptionWrapper(e);
        }
        if (dataInput != null) { // may be null if used by key extractor
            obj.unmarshalEntry(dataInput);
        }
        MarshalledTupleKeyEntity entity = (MarshalledTupleKeyEntity) obj;
View Full Code Here

Examples of com.sleepycat.util.RuntimeExceptionWrapper

                if (currentTxn.isAutoCommitAllowed()) {
                    currentTxn.beginTransaction(null);
                    return true;
                }
            } catch (DatabaseException e) {
                throw new RuntimeExceptionWrapper(e);
            }
        }
        return false;
    }
View Full Code Here

Examples of com.sleepycat.util.RuntimeExceptionWrapper

    static RuntimeException convertException(Exception e) {

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

Examples of com.sleepycat.util.RuntimeExceptionWrapper

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

Examples of com.sleepycat.util.RuntimeExceptionWrapper

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

Examples of com.sleepycat.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

Examples of com.sleepycat.util.RuntimeExceptionWrapper

    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

Examples of com.sleepycat.util.RuntimeExceptionWrapper

        Exception ex = new Exception("some exception");
        String causedBy = "Caused by: java.lang.Exception: some exception";

        try {
            throw new RuntimeExceptionWrapper(ex);
        } catch (RuntimeException e) {
            StringWriter sw = new StringWriter();
            e.printStackTrace(new PrintWriter(sw));
            String s = sw.toString();
            assertTrue(s.indexOf(causedBy) != -1);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.