config_error throws a Python UserWarning as an exception #442

artemp opened this Issue Oct 11, 2011 · 1 comment


None yet
1 participant

artemp commented Oct 11, 2011

If a config_error is thrown in the C++ code, it gets turned into a Python exception via PyErr_SetString() [source:trunk/bindings/python/mapnik_python.cpp#L218]. But the class that is specified is PyExc_UserWarning, which means that in the python code it's raised as an error but is of a warning type. Confusing much?

Since config_error isn't actually a warning (ie. there are no alternative code paths), it should be changed into RuntimeError/ValueError/MapnikConfigError or something else that doesn't imply to the user that everything is okay.


artemp commented Oct 11, 2011

[springmeyer] fixed in r1456, thanks rcoup.

artemp closed this Oct 11, 2011

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment