diff options
| author | Even Rouault <even.rouault@spatialys.com> | 2020-12-16 15:12:51 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-12-16 15:12:51 +0100 |
| commit | 5e077729274f5d28e137e1a41f7d3350146614ef (patch) | |
| tree | d1ef799526f06828328b58ce8ee92c028f723b6a /src/projections/ccon.cpp | |
| parent | 8b1ef9504d0bcfbd8433df943e307bbd1aa30c4f (diff) | |
| parent | a27c0255e7b8e6aab1b91e49fd7870d1ee4e1a80 (diff) | |
| download | PROJ-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/projections/ccon.cpp')
| -rw-r--r-- | src/projections/ccon.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/projections/ccon.cpp b/src/projections/ccon.cpp index 7b3b7105..dc0b0ea4 100644 --- a/src/projections/ccon.cpp +++ b/src/projections/ccon.cpp @@ -84,16 +84,18 @@ PJ *PROJECTION(ccon) { struct pj_opaque *Q = static_cast<struct pj_opaque*>(calloc (1, sizeof (struct pj_opaque))); if (nullptr==Q) - return pj_default_destructor (P, ENOMEM); + return pj_default_destructor (P, PROJ_ERR_OTHER /*ENOMEM*/); P->opaque = Q; P->destructor = destructor; Q->phi1 = pj_param(P->ctx, P->params, "rlat_1").f; if (fabs(Q->phi1) < EPS10) - return destructor (P, PJD_ERR_LAT1_IS_ZERO); - + { + proj_log_error(P, _("Invalid value for lat_1: |lat_1| should be > 0")); + return destructor(P, PROJ_ERR_INVALID_OP_ILLEGAL_ARG_VALUE); + } if (!(Q->en = pj_enfn(P->es))) - return destructor(P, ENOMEM); + return destructor(P, PROJ_ERR_OTHER /*ENOMEM*/); Q->sinphi1 = sin(Q->phi1); Q->cosphi1 = cos(Q->phi1); |
