Package org.apache.avalon.framework

Examples of org.apache.avalon.framework.CascadingRuntimeException


                userList.add(user);
            }
        }
        catch ( SQLException sqlExc) {
            sqlExc.printStackTrace();
            throw new CascadingRuntimeException("Error accessing database", sqlExc);
        }
        finally {
            theJDBCUtil.closeJDBCResultSet(rsUsers);
            theJDBCUtil.closeJDBCStatement(getUsersStatement);
            theJDBCUtil.closeJDBCConnection(conn);
View Full Code Here


            addUserStatement.execute();
        }
        catch ( SQLException sqlExc) {
            sqlExc.printStackTrace();
            throw new CascadingRuntimeException("Error accessing database", sqlExc);
        } finally {
            theJDBCUtil.closeJDBCStatement(addUserStatement);
            theJDBCUtil.closeJDBCConnection(conn);
        }
    }
View Full Code Here

            removeUserStatement.setString(1, username);
            removeUserStatement.execute();
        }
        catch ( SQLException sqlExc ) {
            sqlExc.printStackTrace();
            throw new CascadingRuntimeException("Error accessing database", sqlExc);
        } finally {
            theJDBCUtil.closeJDBCStatement(removeUserStatement);
            theJDBCUtil.closeJDBCConnection(conn);
        }
    }
View Full Code Here

            setUserForUpdateStatement(user, updateUserStatement);
            updateUserStatement.execute();
        }
        catch ( SQLException sqlExc ) {
            sqlExc.printStackTrace();
            throw new CascadingRuntimeException("Error accessing database", sqlExc);
        } finally {
            theJDBCUtil.closeJDBCStatement(updateUserStatement);
            theJDBCUtil.closeJDBCConnection(conn);
        }
    }
View Full Code Here

            }
            return user;
        }
        catch ( SQLException sqlExc ) {
            sqlExc.printStackTrace();
            throw new CascadingRuntimeException("Error accessing database", sqlExc);
        }
        finally {
            theJDBCUtil.closeJDBCResultSet(rsUsers);
            theJDBCUtil.closeJDBCStatement(getUsersStatement);
            theJDBCUtil.closeJDBCConnection(conn);
View Full Code Here

    {
        try {
            return m_datasource.getConnection();
        }
        catch (SQLException sqle) {
            throw new CascadingRuntimeException(
                "An exception occurred getting a database connection.", sqle);
        }
    }
View Full Code Here

*/
public class CascadingRuntimeExceptionTestCase extends TestCase
{
    public void testConstructor()
    {
        assertNotNull( new CascadingRuntimeException( null, null ) );
        assertNotNull( new CascadingRuntimeException( "msg", null ) );
        assertNotNull(
                new CascadingRuntimeException( "msg", new RuntimeException() ) );
        assertNotNull(
                new CascadingRuntimeException( null, new RuntimeException() ) );
    }
View Full Code Here

    }

    public void testGetCause()
    {
        RuntimeException re = new RuntimeException();
        CascadingRuntimeException e = new CascadingRuntimeException( "msg",
                re );

        assertEquals( re, e.getCause() );

        e = new CascadingRuntimeException( "msg", null );
        assertNull( e.getCause() );

        // default to jdk 1.3 cause (not that it seems to help,
        // but it still makes sense)
        /*Exception exc = new Exception("blah");
        try
View Full Code Here

        }*/
    }

    public void testCasts()
    {
        CascadingRuntimeException e = new CascadingRuntimeException( "msg",
                null );
        assertTrue( e instanceof RuntimeException );
        assertTrue( e instanceof CascadingThrowable );
    }
View Full Code Here

            } finally {
                getSourceResolver().release(schemaSrc);
            }
        } catch (Exception e) {
            // couldn't load the validator
            throw new CascadingRuntimeException(" Failed loading validating schema ",
                                                e);
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.avalon.framework.CascadingRuntimeException

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.