| 92 | } |
| 93 | |
| 94 | static PyObject* |
| 95 | pycbc_exception__strerror__(pycbc_exception* self, PyObject* Py_UNUSED(ignored)) |
| 96 | { |
| 97 | if (!self->message.empty()) { |
| 98 | return PyUnicode_FromString(self->message.c_str()); |
| 99 | } |
| 100 | return PyUnicode_FromString(self->ec.message().c_str()); |
| 101 | } |
| 102 | |
| 103 | static PyObject* |
| 104 | pycbc_exception__error_context__(pycbc_exception* self, PyObject* Py_UNUSED(ignored)) |