Revision 3598
Added by Aaron Marcuse-Kubitza over 12 years ago
lib/sql_gen.py | ||
---|---|---|
673 | 673 |
/* Re-raise PL/Python exceptions with the PL/Python prefix removed. |
674 | 674 |
This allows the exception to be parsed like a native exception. |
675 | 675 |
Always raise as data_exception so it goes in the errors table. */ |
676 |
IF exc_name IS NOT NULL AND SQLERRM LIKE '%PL/Python%' THEN |
|
677 |
RAISE data_exception USING MESSAGE = |
|
678 |
msg||E'\\nDETAIL: Python exception class: '||exc_name; |
|
676 |
IF exc_name IS NOT NULL THEN |
|
677 |
RAISE data_exception USING MESSAGE = msg; |
|
679 | 678 |
-- Re-raise non-PL/Python exceptions |
680 | 679 |
ELSE |
681 | 680 |
'''+reraise_exc+'''\ |
Also available in: Unified diff
sql_gen.py: plpythonu_error_handler: Fixed bug where PL/Python exceptions could not be filtered by strings after the first line, because only the "message" portion of the exception is available in SQLERRM