mirror of
https://github.com/pybind/pybind11.git
synced 2024-11-11 08:03:55 +00:00
properly adding value_error exception
This commit is contained in:
parent
a315c7a25a
commit
25ac21903a
@ -394,6 +394,7 @@ protected:
|
||||
}
|
||||
} catch (const error_already_set &) { return nullptr;
|
||||
} catch (const index_error &e) { PyErr_SetString(PyExc_IndexError, e.what()); return nullptr;
|
||||
} catch (const value_error &e) { PyErr_SetString(PyExc_ValueError, e.what()); return nullptr;
|
||||
} catch (const stop_iteration &e) { PyErr_SetString(PyExc_StopIteration, e.what()); return nullptr;
|
||||
} catch (const std::bad_alloc &e) { PyErr_SetString(PyExc_MemoryError, e.what()); return nullptr;
|
||||
} catch (const std::domain_error &e) { PyErr_SetString(PyExc_ValueError, e.what()); return nullptr;
|
||||
|
Loading…
Reference in New Issue
Block a user