diff options
| author | Even Rouault <even.rouault@spatialys.com> | 2020-12-15 00:51:46 +0100 |
|---|---|---|
| committer | Even Rouault <even.rouault@spatialys.com> | 2020-12-15 01:13:43 +0100 |
| commit | 244a24104ded3a4573aeffa32160af21f76cbce6 (patch) | |
| tree | f3a11529172719657cf7576e062e45e0f9452db5 /src/transformations/xyzgridshift.cpp | |
| parent | 1e9894b0e2b161e61546672bccb85a9ef21df541 (diff) | |
| download | PROJ-244a24104ded3a4573aeffa32160af21f76cbce6.tar.gz PROJ-244a24104ded3a4573aeffa32160af21f76cbce6.zip | |
Revise error codes to have a reduced set exposed in the public API.
Fixes #2482
And also add proj_context_errno_string()
Revise gie 'expect failure errno XXXX' strings
Diffstat (limited to 'src/transformations/xyzgridshift.cpp')
| -rw-r--r-- | src/transformations/xyzgridshift.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/transformations/xyzgridshift.cpp b/src/transformations/xyzgridshift.cpp index e37e874d..d00d6484 100644 --- a/src/transformations/xyzgridshift.cpp +++ b/src/transformations/xyzgridshift.cpp @@ -257,7 +257,7 @@ PJ *TRANSFORMATION(xyzgridshift,0) { // Pass a dummy ellipsoid definition that will be overridden just afterwards Q->cart = proj_create(P->ctx, "+proj=cart +a=1"); if (Q->cart == nullptr) - return destructor(P, ENOMEM); + return destructor(P, PROJ_ERR_INVALID_OP /*ENOMEM*/); /* inherit ellipsoid definition from P to Q->cart */ pj_inherit_ellipsoid_def (P, Q->cart); @@ -272,14 +272,14 @@ PJ *TRANSFORMATION(xyzgridshift,0) { // in RGF93 Q->grid_ref_is_input = false; } else { - proj_log_error(P, "xyzgridshift: unusupported value for grid_ref"); - return destructor (P, PJD_ERR_NO_ARGS); + proj_log_error(P, _("xyzgridshift: unusupported value for grid_ref")); + return destructor(P, PROJ_ERR_INVALID_OP_ILLEGAL_ARG_VALUE); } } if (0==pj_param(P->ctx, P->params, "tgrids").i) { - proj_log_error(P, "xyzgridshift: +grids parameter missing."); - return destructor (P, PJD_ERR_NO_ARGS); + proj_log_error(P, _("xyzgridshift: +grids parameter missing.")); + return destructor (P, PROJ_ERR_INVALID_OP_MISSING_ARG); } /* multiplier for delta x,y,z */ @@ -294,8 +294,8 @@ PJ *TRANSFORMATION(xyzgridshift,0) { Q->grids = pj_generic_grid_init(P, "grids"); /* Was gridlist compiled properly? */ if ( proj_errno(P) ) { - proj_log_error(P, "xyzgridshift: could not find required grid(s)."); - return destructor(P, PJD_ERR_FAILED_TO_LOAD_GRID); + proj_log_error(P, _("xyzgridshift: could not find required grid(s).")); + return destructor(P, PROJ_ERR_INVALID_OP_FILE_NOT_FOUND_OR_INVALID); } } |
