[GRASS-dev] Re: [GRASS GIS] #869: Compile libs with -fexception

Glynn Clements glynn at gclements.plus.com
Thu Jan 14 20:18:05 EST 2010


Martin Landa wrote:

> > Whichever approach is used, any code calling G_fatal_error() is
> > entitled to assume that it won't be called again, so it doesn't need
> > to perform clean-up.
> 
> OFT, some clean-up (at module level) would be reasonable, e.g. to
> delete output raster/vector map if module fails.

I was referring specifically to clean-up of in-memory data structures.

Output raster maps are written to a temporary file, which is renamed
into place when the map is closed. If an error occurs, it will result
in a temporary file being left behind, rather than affecting any
existing output map.

This could probably be handled better (e.g. support files are normally
overwritten in place), but this would be better addressed as part of a
more wide-ranging re-organisation of the database layout. There was
some discussion here a while back, although nothing concrete came of
it. It isn't easy to fix without substantially affecting the API.

-- 
Glynn Clements <glynn at gclements.plus.com>


More information about the grass-dev mailing list