| 28 | extern "C++" PyObject* PyCatboostExceptionType; |
| 29 | |
| 30 | void ProcessException() { |
| 31 | try { |
| 32 | throw; |
| 33 | } catch (const TCatBoostException& exc) { |
| 34 | PyErr_SetString(PyCatboostExceptionType, exc.what()); |
| 35 | } catch (const TInterruptException& exc) { |
| 36 | PyErr_SetString(PyExc_KeyboardInterrupt, exc.what()); |
| 37 | } catch (const std::exception& exc) { |
| 38 | PyErr_SetString(PyCatboostExceptionType, exc.what()); |
| 39 | } |
| 40 | } |
| 41 | |
| 42 | void PyCheckInterrupted() { |
| 43 | TGilGuard guard; |
no test coverage detected