| 14 | } |
| 15 | |
| 16 | void ProcessException() { |
| 17 | try { |
| 18 | throw; |
| 19 | } catch (const TInterruptException& exc) { |
| 20 | PyErr_SetString(PyExc_KeyboardInterrupt, exc.what()); |
| 21 | } catch (const std::exception& exc) { |
| 22 | PyErr_SetString(PyHnswExceptionType, exc.what()); |
| 23 | } |
| 24 | } |
| 25 | |
| 26 | |
| 27 | void PyCheckInterrupted() { |