Improved printing of Python exceptions in PL/Python

Peter Eisentraut <peter_e@gmx.net>

Commit: 44e03742d87ea518990ce9e20bee53c239456f20
Author: Peter Eisentraut <peter_e@gmx.net>
Date: 2010-01-16T11:03:51Z
Releases: 9.0.0
Improved printing of Python exceptions in PL/Python

Mimic the Python interpreter's own logic for printing exceptions instead
of just using the straight str() call, so that
you get

    plpy.SPIError

instead of

    <class 'plpy.SPIError'>

and for built-in exceptions merely

    UnicodeEncodeError

Besides looking better this cuts down on the endless version differences
in the regression test expected files.

Files