}
else
{
- SPI_finish();
- pfree(proj_str);
- return NULL;
+ proj_str[0] = 0;
}
}
else
projection = lwproj_from_string(proj_str);
if ( projection == NULL )
{
+ char *pj_errstr = pj_strerrno(*pj_get_errno_ref());
+ if ( ! pj_errstr )
+ pj_errstr = "";
+
elog(ERROR,
- "AddToPROJ4SRSCache: couldn't parse proj4 string: '%s': %s",
- proj_str, pj_strerrno(*pj_get_errno_ref()));
+ "AddToPROJ4SRSCache: could not parse proj4 string '%s' %s",
+ proj_str, pj_errstr);
}
/*
#852.2|1|t|t
#852.2|2|t|t
#1489|MULTIPOINT EMPTY|0|MULTILINESTRING EMPTY|0|MULTIPOLYGON EMPTY|0|GEOMETRYCOLLECTION EMPTY|0
-ERROR: GetProj4String returned NULL for SRID (500001)
+ERROR: AddToPROJ4SRSCache: could not parse proj4 string ''
#1038|
#1042|2
#1398a|POINT(-119.093153 45.632669)