db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Thill <cthil...@yahoo.com>
Subject Database independent error trapping.
Date Fri, 09 Feb 2007 11:47:21 GMT
I am wondering if there is a way to do database
independent error trapping.

For example on a table/object that has a unique key I
just invoke the .save() method and and trap any
exception.  I look at the exception to see if it was a
duplicate value in the unique column that caused the
error and then explain this to the user in a friendly

My problem is that I want the system to portable to
different database so I do not want to do something

    eSql = (SQLException) t;
    if ( !eSql.getSQLState().equals("23505") ) 

To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org

View raw message