[GRASS-dev] GRASS scripting Python API error/fatal handling

Sören Gebbert soerengebbert at googlemail.com
Mon Nov 5 16:31:58 PST 2012


Hi,
sorry fir the late response.


2012/10/1 Glynn Clements <glynn at gclements.plus.com>

>
> Sören Gebbert wrote:
>
> > > For simple clean-up operations, atexit.register() is sufficient.
> >
> > While implementing this, can we use the "raise_on_error" flag to
> > enable the raise of a ScriptError exception in fatal()?
> > It would be only a simple modification of the current code i guess.
>
> Yes. The only thing which needs to be done is to move the conditional
> from error() to fatal(), and check any code which might be using
> set_raise_on_error() in case it relies upon the existing behaviour.
>

Done in r53396.

Best regards
Soeren

Most scripts should continue to use atexit.register() for clean-up and
> not bother with exception handling.
>
> --
> Glynn Clements <glynn at gclements.plus.com>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-dev/attachments/20121106/609f3064/attachment.html>


More information about the grass-dev mailing list