[Gdal-dev] Trapping coordinate transformation errors gracefully

Frank Warmerdam fwarmerdam at gmail.com
Mon Jan 10 09:55:53 EST 2005


On Mon, 10 Jan 2005 11:25:58 +0000, Tim Sutton <tim at linfiniti.com> wrote:
> As you see from the code excerpt below I do try to trap for the transform
> failing, but when the error is encountered QGIS segfaults. A backtrace is
> included at the end of this email - though I dont have gdal built with
> debugging support so I dont know how useful it is.

Tim,

>From the traceback information it looks like you are dying because there
is no handler for the exception you are throwing.  Off hand it does not seem
like a GDAL problem. 

If you have a concern about the GDAL (really PROJ) error message
being written to stderr, you can do the following to supress error output
to stderr:

  CPLPushErrorHandler( CPLQuietErrorHandler );

Best regards,
-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent



More information about the Gdal-dev mailing list