Greetings<div><br></div><div>I have  python script where I try to catch, as much as possible all errors, in order to avoid &quot;abrupt&quot; ERRORS from the script.</div><div>for instance I do this for grass.run_command:</div>
<div><br></div><div><div>p=grass.run_command(&quot;i.group&quot;, group=group_name, subgroup=&quot;subgroup&quot;, input= input)</div><div>    if p!=0:</div><div>       grass.fatal(_(&quot;ERROR MESSAGE&quot;))<span class="Apple-tab-span" style="white-space:pre">                        </span></div>
<div><span class="Apple-tab-span" style="white-space:pre"><br></span></div><div><span class="Apple-tab-span" style="white-space:pre">b</span>ut I&#39;m not being able to do this for grass.mapcalc. has anyone any suggestion or tip on how to do this for grass.mapcalc?</div>
<div>Thanks</div><div><br></div><div>Kim</div><div><span class="Apple-tab-span" style="white-space:pre">        </span></div></div>