[GRASS-dev] Vect_*_fatal_error()
Martin Landa
landa.martin at gmail.com
Thu Nov 10 17:13:50 EST 2011
Hi,
2011/11/10 Hamish <hamish_b at yahoo.com>:
> what's the practical use case you've found which could use it?
it's very very easy. The GRASS libraries has been originally designed
for GRASS modules (read command parameters, do processing,
terminates). Unfortunately there are applications which using GRASS
libraries and they do not behaves like GRASS modules. It started with
QGIS plugin for GRASS and it continues with all wxGUI components which
are using GRASS libraries via ctypes. Just try to use vector digitizer
or wxNViz, the whole GUI just crashes without any kind of message when
G_fatal_error() is called. Well due to design, anyway very user
friendly. I am not a fan of G_set_fatal_error() solution, on the other
hand I don't see any reason why to *forbid* so strictly the
programmers which are using GRASS libraries to avoid calling system
exit on G_fatal_error(). The default behaviour will remain! We just
let other programmers (with a big warning) to use GRASS libraries for
the purpose which they were not originally designed nothing more.
Martin
--
Martin Landa <landa.martin gmail.com> * http://geo.fsv.cvut.cz/~landa
More information about the grass-dev
mailing list