Standard exception handling (database)