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/labrd.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/labrd.cpp')
| -rw-r--r-- | src/projections/labrd.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/projections/labrd.cpp b/src/projections/labrd.cpp index 4fbcf460..9fa17817 100644 --- a/src/projections/labrd.cpp +++ b/src/projections/labrd.cpp @@ -107,11 +107,12 @@ PJ *PROJECTION(labrd) { double Az, sinp, R, N, t; 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; if (P->phi0 == 0.) { - return pj_default_destructor(P, PJD_ERR_LAT_0_IS_ZERO); + proj_log_error(P, _("Invalid value for lat_0: lat_0 should be different from 0")); + return pj_default_destructor(P, PROJ_ERR_INVALID_OP_ILLEGAL_ARG_VALUE); } Az = pj_param(P->ctx, P->params, "razi").f; |
