[GRASS-dev] GRASS & QGIS: the future
Vaclav Petras
wenzeslaus at gmail.com
Fri Apr 18 19:12:01 PDT 2014
On Fri, Apr 18, 2014 at 6:43 PM, Glynn Clements <glynn at gclements.plus.com>wrote:
> > Unfortunately GRASS 7 moved ahead towards its aim "to make life harder
> > for anyone trying to use the GRASS libraries" [1].
>
> That isn't actually the reason why various functions have had status
> returns changed to fatal errors. The reason is to avoid pushing the
> burden of error handling onto their callers.
The fact is that no library should use exit() or similar things if it wants
to be general. GRASS library is intended to be used only for building GRASS
modules, thus it is specialized for them, thus it uses G_fatal_error() with
exit(). (At least there is a believe that exit makes it easier.)
As a result using GRASS functions outside the scope of GRASS modules
requires another library. It would be nice to have two libraries, one for
GRASS modules (with exit()) and one for everybody else. Hopefully, it would
be possible to share the same code to some extent. Alternative is to use
the RPC wrapper as suggested earlier by Soeren, as far as I understand this
has the same result. The questions are what is less work, less duplication,
what has easier maintenance and what is easier to do for all the platforms.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-dev/attachments/20140418/09b9652c/attachment-0001.html>
More information about the grass-dev
mailing list