1 /* 2 * src/pl/plpython/plpy_elog.h 3 */ 4 5 #ifndef PLPY_ELOG_H 6 #define PLPY_ELOG_H 7 8 /* global exception classes */ 9 extern PyObject *PLy_exc_error; 10 extern PyObject *PLy_exc_fatal; 11 extern PyObject *PLy_exc_spi_error; 12 13 extern void PLy_elog(int elevel, const char *fmt,...) pg_attribute_printf(2, 3); 14 15 extern void PLy_exception_set(PyObject *exc, const char *fmt,...) pg_attribute_printf(2, 3); 16 17 extern void PLy_exception_set_plural(PyObject *exc, const char *fmt_singular, const char *fmt_plural, 18 unsigned long n,...) pg_attribute_printf(2, 5) pg_attribute_printf(3, 5); 19 20 extern void PLy_exception_set_with_details(PyObject *excclass, ErrorData *edata); 21 22 #endif /* PLPY_ELOG_H */ 23