summaryrefslogtreecommitdiff
path: root/psycopg/pqpath.h
diff options
context:
space:
mode:
authorJames Henstridge <james@jamesh.id.au>2007-12-19 14:29:03 +0000
committerJames Henstridge <james@jamesh.id.au>2007-12-19 14:29:03 +0000
commitfd5d2d52384068ad7ad30aafd9d2ea525d7909fa (patch)
tree835d3d5ca297d8db91d303664de26080518b5b3d /psycopg/pqpath.h
parent67afd678b0d5e84aeb743c5e45b04d141701f4f0 (diff)
downloadpsycopg2-fd5d2d52384068ad7ad30aafd9d2ea525d7909fa.tar.gz
* psycopg/pqpath.c (pq_raise): only remove the first 8 characters
of the exception message if it actually gives the severity. * psycopg/pqpath.h (pq_resolve_critical): add prototype, since this function is being used from connection_int.c. * psycopg/psycopg.h: update psyco_set_error() prototype. * psycopg/psycopgmodule.c (psyco_errors_init): set pgerror, pgcode and cursor class attributes to None on psycopg2.Error so that the attributes will always be available (simplifies error handling). (psyco_set_error): add const qualifiers to msg, pgerror and pgcode arguments. Don't bother setting pgerror, pgcode or cursor to None if they are not provided -- the class defaults take care of this.
Diffstat (limited to 'psycopg/pqpath.h')
-rw-r--r--psycopg/pqpath.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/psycopg/pqpath.h b/psycopg/pqpath.h
index 64d113e..57be047 100644
--- a/psycopg/pqpath.h
+++ b/psycopg/pqpath.h
@@ -37,5 +37,6 @@ extern int pq_commit(connectionObject *conn);
extern int pq_abort(connectionObject *conn);
extern int pq_is_busy(connectionObject *conn);
extern void pq_set_critical(connectionObject *conn, const char *msg);
+extern PyObject *pq_resolve_critical(connectionObject *conn, int close);
#endif /* !defined(PSYCOPG_PQPATH_H) */