Go to the source code of this file.
|
| PGDLLEXPORT void | PLy_elog_impl (int elevel, const char *fmt,...) pg_attribute_printf(2 |
| |
| PGDLLEXPORT void PGDLLEXPORT void | PLy_exception_set (PyObject *exc, const char *fmt,...) pg_attribute_printf(2 |
| |
| PGDLLEXPORT void PGDLLEXPORT void PGDLLEXPORT void | PLy_exception_set_plural (PyObject *exc, const char *fmt_singular, const char *fmt_plural, unsigned long n,...) pg_attribute_printf(2 |
| |
| PGDLLEXPORT void PGDLLEXPORT void PGDLLEXPORT void | pg_attribute_printf (3, 5) |
| |
| PGDLLEXPORT void | PLy_exception_set_with_details (PyObject *excclass, ErrorData *edata) |
| |
◆ PLy_elog
| #define PLy_elog |
( |
|
elevel, |
|
|
|
... |
|
) |
| |
Value: do { \
const int elevel_ = (elevel); \
PLy_elog_impl(elevel_, __VA_ARGS__); \
pg_unreachable(); \
} while(0)
Definition at line 28 of file plpy_elog.h.
◆ pg_attribute_printf()
◆ PLy_elog_impl()
| PGDLLEXPORT void PLy_elog_impl |
( |
int |
elevel, |
|
|
const char * |
fmt, |
|
|
|
... |
|
) |
| |
◆ PLy_exception_set()
◆ PLy_exception_set_plural()
| PGDLLEXPORT void PGDLLEXPORT void PGDLLEXPORT void PLy_exception_set_plural |
( |
PyObject * |
exc, |
|
|
const char * |
fmt_singular, |
|
|
const char * |
fmt_plural, |
|
|
unsigned long |
n, |
|
|
|
... |
|
) |
| |
◆ PLy_exception_set_with_details()
Definition at line 522 of file plpy_elog.c.
523{
524 PyObject *
args = NULL;
525 PyObject *
error = NULL;
526
529 goto failure;
530
531
532 error = PyObject_CallObject(excclass,
args);
534 goto failure;
535
538 goto failure;
539
541 goto failure;
542
544 goto failure;
545
547 goto failure;
548
550 goto failure;
551
553 goto failure;
554
556 goto failure;
557
559 goto failure;
560
562 goto failure;
563
564 PyErr_SetObject(excclass,
error);
565
568
569 return;
570
571failure:
574
575 elog(
ERROR,
"could not convert error to Python exception");
576}
char * unpack_sql_state(int sql_state)
static bool set_string_attr(PyObject *obj, char *attrname, char *str)
References generate_unaccent_rules::args, ErrorData::column_name, ErrorData::constraint_name, ErrorData::datatype_name, ErrorData::detail, elog, ERROR, error(), ErrorData::hint, ErrorData::internalquery, ErrorData::message, ErrorData::schema_name, set_string_attr(), ErrorData::sqlerrcode, ErrorData::table_name, and unpack_sql_state().
Referenced by PLy_output().
◆ PLy_exc_error
◆ PLy_exc_fatal
◆ PLy_exc_spi_error
| PyObject* PLy_exc_spi_error |
|
extern |