From 3714cb61d76704d529cf9ea2f59504833bb3922f Mon Sep 17 00:00:00 2001
From: jlaura <jlaura@usgs.gov>
Date: Tue, 2 Oct 2018 16:52:27 -0400
Subject: [PATCH] Swaps from error to warning on out of bounds. (#114)

* Swaps from error to warning on out of bounds.

* Fixes the correct error/warning
---
 src/UsgsAstroLsSensorModel.cpp | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/src/UsgsAstroLsSensorModel.cpp b/src/UsgsAstroLsSensorModel.cpp
index d16eefe..b2cb984 100644
--- a/src/UsgsAstroLsSensorModel.cpp
+++ b/src/UsgsAstroLsSensorModel.cpp
@@ -302,15 +302,14 @@ csm::ImageCoord UsgsAstroLsSensorModel::groundToImage(
    // Check that the pixel is actually in the image
    if ((calculatedPixel.samp < 0) ||
        (calculatedPixel.samp > _data.m_TotalSamples)) {
-      throw csm::Error(
-         csm::Error::ALGORITHM,
-         "Ground point is not viewed by the image.",
+      throw csm::Warning(
+         csm::Warning::IMAGE_COORD_OUT_OF_BOUNDS,
+         "The image coordinate is out of bounds of the image size.",
          "UsgsAstroLsSensorModel::groundToImage");
    }
 
    // If the final correction is greater than 10 meters,
    // the solution is not valid enough to report even with a warning
-   printf("%f\n", len);
    if (len > 100.0) {
       throw csm::Error(
          csm::Error::ALGORITHM,
-- 
GitLab