module JamRuby class DbUtil def self.create(connection_hash) end BAD_CONN_EXCEPTIONS = [PG::UnableToSend, PG::ConnectionBad] def self.bad_conn_exception?(exception) test_exception = exception if exception.class == ActiveRecord::StatementInvalid test_exception = exception.original_exception end BAD_CONN_EXCEPTIONS.include?(test_exception.class) end end end