<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Apr 18, 2014 at 6:43 PM, Glynn Clements <span dir="ltr"><<a href="mailto:glynn@gclements.plus.com" target="_blank">glynn@gclements.plus.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div class="">> Unfortunately GRASS 7 moved ahead towards its aim "to make life harder<br>


> for anyone trying to use the GRASS libraries" [1].<br>
<br>
</div>That isn't actually the reason why various functions have had status<br>
returns changed to fatal errors. The reason is to avoid pushing the<br>
burden of error handling onto their callers.</blockquote></div><br>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<span style="font-family:arial,sans-serif;font-size:13px"> </span><span style="font-family:arial,sans-serif;font-size:13px">G_fatal_error()</span> with exit(). (At least there is a believe that exit makes it easier.)</div>

<div class="gmail_extra"><br></div><div class="gmail_extra">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 <span style="font-family:arial,sans-serif;font-size:13px">Soeren, as far as I understand this has the same result. The questions are what is less work, less duplication, what has easier </span><font face="arial, sans-serif">maintenance and what is easier to do for all the platforms.</font></div>

</div>