From c1a1da37590e584bf2f4610fc7986a62e926ef26 Mon Sep 17 00:00:00 2001 From: Sandro Santilli Date: Sun, 30 Jan 2005 09:12:00 +0000 Subject: [PATCH] Made unparsable proj strings error more verbose and removed a typo in transform_geom(). git-svn-id: http://svn.osgeo.org/postgis/trunk@1353 b70326c6-7e19-0410-871a-916f4a2858ee --- lwgeom/lwgeom_transform.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/lwgeom/lwgeom_transform.c b/lwgeom/lwgeom_transform.c index f519dbe90..910c17100 100644 --- a/lwgeom/lwgeom_transform.c +++ b/lwgeom/lwgeom_transform.c @@ -282,19 +282,21 @@ Datum transform_geom(PG_FUNCTION_ARGS) input_pj = make_project(input_proj4); if ( (input_pj == NULL) || pj_errno) { - pfree(input_proj4); pfree(output_proj4); + //pfree(input_proj4); + pfree(output_proj4); pfree(geom); - elog(ERROR,"tranform: couldnt parse proj4 input string"); + elog(ERROR, "transform: couldn't parse proj4 input string: '%s': %s", input_proj4, pj_strerrno(pj_errno)); PG_RETURN_NULL(); } output_pj = make_project(output_proj4); if ((output_pj == NULL)|| pj_errno) { - pfree(input_proj4); pfree(output_proj4); + pfree(input_proj4); + //pfree(output_proj4); pj_free(input_pj); pfree(geom); - elog(ERROR,"tranform: couldnt parse proj4 output string"); + elog(ERROR, "transform: couldn't parse proj4 output string: '%s': %s", output_proj4, pj_strerrno(pj_errno)); PG_RETURN_NULL(); } @@ -353,7 +355,7 @@ transform_point(POINT2D *pt, PJ *srcpj, PJ *dstpj) if (pj_errno) { - elog(ERROR,"transform: couldnt project point: %i (%s)", + elog(ERROR,"transform: couldn't project point: %i (%s)", pj_errno,pj_strerrno(pj_errno)); return 0; } -- 2.40.0