[GRASS-user] Catch errors from grass.mapcalc

Kim Besson kimbesson1981 at gmail.com
Fri Oct 29 05:10:14 EDT 2010


Greetings

I have  python script where I try to catch, as much as possible all errors,
in order to avoid "abrupt" ERRORS from the script.
for instance I do this for grass.run_command:

p=grass.run_command("i.group", group=group_name, subgroup="subgroup", input=
input)
    if p!=0:
       grass.fatal(_("ERROR MESSAGE"))

but I'm not being able to do this for grass.mapcalc. has anyone any
suggestion or tip on how to do this for grass.mapcalc?
Thanks

Kim
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/grass-user/attachments/20101029/172c4235/attachment.html


More information about the grass-user mailing list