add missing exception translator for datasource exceptions by catching std::exception - closes #1816
This commit is contained in:
parent
0a68f66c35
commit
20b643a22a
1 changed files with 7 additions and 0 deletions
|
@ -348,6 +348,11 @@ void runtime_error_translator(std::runtime_error const & ex)
|
|||
PyErr_SetString(PyExc_RuntimeError, ex.what());
|
||||
}
|
||||
|
||||
void standard_error_translator(std::exception const & ex)
|
||||
{
|
||||
PyErr_SetString(PyExc_RuntimeError, ex.what());
|
||||
}
|
||||
|
||||
unsigned mapnik_version()
|
||||
{
|
||||
return MAPNIK_VERSION;
|
||||
|
@ -424,6 +429,8 @@ BOOST_PYTHON_MODULE(_mapnik)
|
|||
register_exception_translator<mapnik::config_error>(&config_error_translator);
|
||||
register_exception_translator<mapnik::value_error>(&value_error_translator);
|
||||
register_exception_translator<std::runtime_error>(&runtime_error_translator);
|
||||
// catch the rest
|
||||
register_exception_translator<std::exception>(&standard_error_translator);
|
||||
register_cairo();
|
||||
export_query();
|
||||
export_geometry();
|
||||
|
|
Loading…
Add table
Reference in a new issue