aboutsummaryrefslogtreecommitdiff
path: root/src/inv.cpp
diff options
context:
space:
mode:
authorEven Rouault <even.rouault@spatialys.com>2020-12-16 15:12:51 +0100
committerGitHub <noreply@github.com>2020-12-16 15:12:51 +0100
commit5e077729274f5d28e137e1a41f7d3350146614ef (patch)
treed1ef799526f06828328b58ce8ee92c028f723b6a /src/inv.cpp
parent8b1ef9504d0bcfbd8433df943e307bbd1aa30c4f (diff)
parenta27c0255e7b8e6aab1b91e49fd7870d1ee4e1a80 (diff)
downloadPROJ-5e077729274f5d28e137e1a41f7d3350146614ef.tar.gz
PROJ-5e077729274f5d28e137e1a41f7d3350146614ef.zip
Merge pull request #2487 from rouault/error_mgt_improvements
Error management: revise error codes and expose them to the public API
Diffstat (limited to 'src/inv.cpp')
-rw-r--r--src/inv.cpp10
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])