MCPcopy Index your code
hub / github.com/dbcli/pgcli / _must_raise

Method _must_raise

pgcli/pgexecute.py:429–441  ·  view source on GitHub ↗

Return true if e is an error that should not be caught in ``run``. An uncaught error will prompt the user to reconnect; as long as we detect that the connection is still open, we catch the error, as reconnecting won't solve that problem. :param e: DatabaseError. An

(self, e)

Source from the content-addressed store, hash-verified

427 self.reset_expanded = None
428
429 def _must_raise(self, e):
430 """Return true if e is an error that should not be caught in ``run``.
431
432 An uncaught error will prompt the user to reconnect; as long as we
433 detect that the connection is still open, we catch the error, as
434 reconnecting won't solve that problem.
435
436 :param e: DatabaseError. An exception raised while executing a query.
437
438 :return: Bool. True if ``run`` must raise this exception.
439
440 """
441 return self.conn.closed != 0
442
443 def execute_normal_sql(self, split_sql):
444 """Returns tuple (title, rows, headers, status)"""

Callers 1

runMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected