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/inv.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/inv.cpp')
| -rw-r--r-- | src/inv.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/inv.cpp b/src/inv.cpp index 626c9ee5..b4a42189 100644 --- a/src/inv.cpp +++ b/src/inv.cpp @@ -38,7 +38,7 @@ static PJ_COORD inv_prepare (PJ *P, PJ_COORD coo) { if (coo.v[0] == HUGE_VAL || coo.v[1] == HUGE_VAL || coo.v[2] == HUGE_VAL) { - proj_errno_set (P, PJD_ERR_INVALID_X_OR_Y); + proj_errno_set (P, PROJ_ERR_COORD_TRANSFM_OUTSIDE_PROJECTION_DOMAIN); return proj_coord_error (); } @@ -97,7 +97,7 @@ static PJ_COORD inv_prepare (PJ *P, PJ_COORD coo) { static PJ_COORD inv_finalize (PJ *P, PJ_COORD coo) { if (coo.xyz.x == HUGE_VAL) { - proj_errno_set (P, PJD_ERR_INVALID_X_OR_Y); + proj_errno_set (P, PROJ_ERR_COORD_TRANSFM_OUTSIDE_PROJECTION_DOMAIN); return proj_coord_error (); } @@ -163,7 +163,7 @@ PJ_LP pj_inv(PJ_XY xy, PJ *P) { else if (P->inv4d) coo = P->inv4d (coo, P); else { - proj_errno_set (P, EINVAL); + proj_errno_set (P, PROJ_ERR_OTHER_NO_INVERSE_OP); return proj_coord_error ().lp; } if (HUGE_VAL==coo.v[0]) @@ -197,7 +197,7 @@ PJ_LPZ pj_inv3d (PJ_XYZ xyz, PJ *P) { else if (P->inv) coo.lp = P->inv (coo.xy, P); else { - proj_errno_set (P, EINVAL); + proj_errno_set (P, PROJ_ERR_OTHER_NO_INVERSE_OP); return proj_coord_error ().lpz; } if (HUGE_VAL==coo.v[0]) @@ -227,7 +227,7 @@ PJ_COORD pj_inv4d (PJ_COORD coo, PJ *P) { else if (P->inv) coo.lp = P->inv (coo.xy, P); else { - proj_errno_set (P, EINVAL); + proj_errno_set (P, PROJ_ERR_OTHER_NO_INVERSE_OP); return proj_coord_error (); } if (HUGE_VAL==coo.v[0]) |
