[GRASS-dev] Re: [GRASS-user] Catch errors from grass.mapcalc

Martin Landa landa.martin at gmail.com
Sat Oct 30 04:56:23 EDT 2010


Hi,

2010/10/30 Glynn Clements <glynn at gclements.plus.com>:
> Beyond that, we should probably think about how to deal with errors in
> the Python scripting library. I.e. whether to raise Python exceptions,
> return status codes, call fatal(), etc. Right now, each function does
> as it pleases; there isn't any consistency.

r44086 helps a bit?

error() raise ScriptException() by default. If you call
raise_on_error(False) then error() prints error message via `g.message
-e`.

Martin

-- 
Martin Landa <landa.martin gmail.com> * http://geo.fsv.cvut.cz/~landa


More information about the grass-dev mailing list