From 244a24104ded3a4573aeffa32160af21f76cbce6 Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Tue, 15 Dec 2020 00:51:46 +0100 Subject: 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 --- src/projections/merc.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/projections/merc.cpp') diff --git a/src/projections/merc.cpp b/src/projections/merc.cpp index 3a0ed7b4..7fd3dff9 100644 --- a/src/projections/merc.cpp +++ b/src/projections/merc.cpp @@ -53,7 +53,10 @@ PJ *PROJECTION(merc) { if( (is_phits = pj_param(P->ctx, P->params, "tlat_ts").i) ) { phits = fabs(pj_param(P->ctx, P->params, "rlat_ts").f); if (phits >= M_HALFPI) - return pj_default_destructor(P, PJD_ERR_LAT_TS_LARGER_THAN_90); + { + proj_log_error(P, _("Invalid value for lat_ts: |lat_ts| should be <= 90°")); + return pj_default_destructor(P, PROJ_ERR_INVALID_OP_ILLEGAL_ARG_VALUE); + } } if (P->es != 0.0) { /* ellipsoid */ -- cgit v1.2.3