From 498d97731e6d183c56edb49d580a1adfc6204260 Mon Sep 17 00:00:00 2001 From: Jesse Mapel <jmapel@usgs.gov> Date: Thu, 7 Jan 2021 14:58:03 -0700 Subject: [PATCH] Added no sharing criteria --- src/UsgsAstroFrameSensorModel.cpp | 9 +++------ src/UsgsAstroLsSensorModel.cpp | 7 ++----- tests/FrameCameraTests.cpp | 6 +----- 3 files changed, 6 insertions(+), 16 deletions(-) diff --git a/src/UsgsAstroFrameSensorModel.cpp b/src/UsgsAstroFrameSensorModel.cpp index 13b5e4c..469e825 100644 --- a/src/UsgsAstroFrameSensorModel.cpp +++ b/src/UsgsAstroFrameSensorModel.cpp @@ -525,7 +525,7 @@ UsgsAstroFrameSensorModel::computeAllSensorPartials( groundPt.x, groundPt.y, groundPt.z, imagePt.line, imagePt.samp, pset, desiredPrecision); - return RasterGM::computeAllSensorPartials(imagePt, groundPt, pset, desiredPrecision, + return RasterGM::computeAllSensorPartials(imagePt, groundPt, pset, desiredPrecision, achievedPrecision, warnings); } @@ -1125,12 +1125,9 @@ csm::SharingCriteria UsgsAstroFrameSensorModel::getParameterSharingCriteria( int index) const { MESSAGE_LOG( "Checking sharing criteria for parameter {}. " - "Sharing is not supported, throwing exception", + "Sharing is not supported.", index); - // Parameter sharing is not supported for this sensor, - // all indices are out of range - throw csm::Error(csm::Error::INDEX_OUT_OF_RANGE, "Index out of range.", - "UsgsAstroLsSensorModel::getParameterSharingCriteria"); + return csm::SharingCriteria(); } double UsgsAstroFrameSensorModel::getParameterValue(int index) const { diff --git a/src/UsgsAstroLsSensorModel.cpp b/src/UsgsAstroLsSensorModel.cpp index a4cf4b6..688d19d 100644 --- a/src/UsgsAstroLsSensorModel.cpp +++ b/src/UsgsAstroLsSensorModel.cpp @@ -1568,12 +1568,9 @@ csm::SharingCriteria UsgsAstroLsSensorModel::getParameterSharingCriteria( int index) const { MESSAGE_LOG( "Checking sharing criteria for parameter {}. " - "Sharing is not supported, throwing exception", + "Sharing is not supported.", index); - // Parameter sharing is not supported for this sensor, - // all indices are out of range - throw csm::Error(csm::Error::INDEX_OUT_OF_RANGE, "Index out of range.", - "UsgsAstroLsSensorModel::getParameterSharingCriteria"); + return csm::SharingCriteria(); } //*************************************************************************** diff --git a/tests/FrameCameraTests.cpp b/tests/FrameCameraTests.cpp index daf7324..f367585 100644 --- a/tests/FrameCameraTests.cpp +++ b/tests/FrameCameraTests.cpp @@ -624,11 +624,7 @@ TEST_F(FrameSensorModelLogging, IsParameterShareable) { } TEST_F(FrameSensorModelLogging, GetParameterSharingCriteria) { - try { - sensorModel->getParameterSharingCriteria(0); - } catch (...) { - // Just testing logging, so do nothing, it should still log - } + sensorModel->getParameterSharingCriteria(0); } TEST_F(FrameSensorModelLogging, GetParameterValue) { -- GitLab