If I run a python program that calls a stored procedure without a "try:" , I see a descriptive message in the error that is returned (highlighted inyellowbelow):
>>> cur.execute("select * from f_test_return_error2('normon')") Traceback (most recent call last): File "<stdin>", line 1, in ? File "/usr/lib/python2.4/site-packages/psycopg2/extras.py", line 48, in execute return _cursor.execute(self, query, vars, async) psycopg2.ProgrammingError: Error. Party name normon not found in the party table. but if I put the "cur.execute" in a "try:" / "except:" I cannot figure out where to get the error text that I need, can anyone help please?? I know it is possible because a friend of mine can get it back from SQLAlchemy and SQLAlchemy uses psycopg2. thanks, - chris
_______________________________________________ DB-SIG maillist - DB-SIG@python.org http://mail.python.org/mailman/listinfo/db-sig