[GRASS-dev] [GRASS-SVN] r60048 - grass/trunk/vector/v.in.db

Huidae Cho grass4u at gmail.com
Sun May 4 07:37:24 PDT 2014


Glynn,

I agree with you that Vect_open needs to call fatal error just like
Rast_open because there would be nothing to do *except* cleaning garbage
when opening fails. Some modules actually delete temp files before quitting
and http://lists.osgeo.org/pipermail/grass-dev/2013-April/062938.html this
discussion may be just for that, I think.

BTW, I don't see Rast_open_old returning a negative value on failure as
documented in the developer's manual. If this is clearly documented and
fatal error is also mentioned, it would save unnecessary conditional checks
against Rast_open_old.

Just my 2 cents.
Huidae
On May 4, 2014 3:23 AM, "Glynn Clements" <glynn at gclements.plus.com> wrote:

>
> Huidae Cho wrote:
>
> > OK, I did a quick search and there are 104 calls to Vect_open_new. 63
> calls
> > don't check its return value and 41 calls check.
>
> This is the main reason why I replaced status returns with fatal
> errors in much of lib/raster and lib/gis (r40209, r40217, r40701).
>
> I propose that lib/vector takes the same approach (I didn't touch
> lib/vector at the time because I'm not that familiar with it, and was
> unsure as to its stability).
>
> --
> Glynn Clements <glynn at gclements.plus.com>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-dev/attachments/20140504/be9a07b3/attachment.html>


More information about the grass-dev mailing list