diff options
| author | Even Rouault <even.rouault@spatialys.com> | 2019-03-26 14:09:11 +0100 |
|---|---|---|
| committer | Even Rouault <even.rouault@spatialys.com> | 2019-03-26 14:09:11 +0100 |
| commit | 01f6d08f0a0d3b05c28d6772d63b506171c59371 (patch) | |
| tree | b3a8e7f05e31de7470394d206f52a33f1c31324d /src/apps/projinfo.cpp | |
| parent | 53aefd520aa7f0607263fa2f2a7b89be81dfeac6 (diff) | |
| download | PROJ-01f6d08f0a0d3b05c28d6772d63b506171c59371.tar.gz PROJ-01f6d08f0a0d3b05c28d6772d63b506171c59371.zip | |
projinfo: catch potentially uncaugh exception. Coverity CID 193527
Diffstat (limited to 'src/apps/projinfo.cpp')
| -rw-r--r-- | src/apps/projinfo.cpp | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/src/apps/projinfo.cpp b/src/apps/projinfo.cpp index 4c99d7ce..7d4a8399 100644 --- a/src/apps/projinfo.cpp +++ b/src/apps/projinfo.cpp @@ -1132,11 +1132,18 @@ int main(int argc, char **argv) { } } - outputOperations( - dbContext, sourceCRSStr, targetCRSStr, bboxFilter, spatialCriterion, - spatialCriterionExplicitlySpecified, crsExtentUse, - gridAvailabilityUse, allowUseIntermediateCRS, pivots, authority, - usePROJGridAlternatives, showSuperseded, outputOpt, summary); + try { + outputOperations(dbContext, sourceCRSStr, targetCRSStr, bboxFilter, + spatialCriterion, + spatialCriterionExplicitlySpecified, crsExtentUse, + gridAvailabilityUse, allowUseIntermediateCRS, + pivots, authority, usePROJGridAlternatives, + showSuperseded, outputOpt, summary); + } catch (const std::exception &e) { + std::cerr << "outputOperations() failed with: " << e.what() + << std::endl; + std::exit(1); + } } return 0; |
