[geos-devel] Exceptions

Paul Ramsey pramsey at refractions.net
Sat Apr 19 03:22:52 EDT 2003


The exceptions continue to muck with us. Exceptions thrown in geos have 
not been catchable, and are taking down the postgres backend with 
sigabort. I did a grep for "throw" in the source code, and the 
exceptions are a bit of a mishmash. Most of them are of the form,

   throw "PointCoordinateList exception: can't retrieve element\n";

But some are of the form,

   throw new ParseException(e.toString());

or

   throw ParseException("Expected number but encountered ')'")

So, sometimes we are throwing strings, sometimes we are throwing new 
exception objects and other times just static things?

Anyhow, we have had better luck catching the simple throws (the 
strings). Is there a reason for throwing specially constructed 
exception objects?


      Paul Ramsey
      Refractions Research
      Email: pramsey at refractions.net
      Phone: (250) 885-0632




More information about the geos-devel mailing list