Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit804d13a

Browse files
committed
Fix behavior when raising plpy.Fatal()
It should cause a elog(FATAL) error, and it fact it was simply causinga elog(ERROR).Jan Urbański
1 parent8f76324 commit804d13a

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

‎src/pl/plpython/plpython.c

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4381,8 +4381,13 @@ PLy_elog(int elevel, const char *fmt,...)
43814381
intposition=0;
43824382

43834383
PyErr_Fetch(&exc,&val,&tb);
4384-
if (exc!=NULL&&PyErr_GivenExceptionMatches(val,PLy_exc_spi_error))
4385-
PLy_get_spi_error_data(val,&detail,&hint,&query,&position);
4384+
if (exc!=NULL)
4385+
{
4386+
if (PyErr_GivenExceptionMatches(val,PLy_exc_spi_error))
4387+
PLy_get_spi_error_data(val,&detail,&hint,&query,&position);
4388+
elseif (PyErr_GivenExceptionMatches(val,PLy_exc_fatal))
4389+
elevel=FATAL;
4390+
}
43864391
PyErr_Restore(exc,val,tb);
43874392

43884393
xmsg=PLy_traceback(&xlevel);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp