[gexiv2/gexiv2-0.10] Catching the correct exception at zero division



commit 464b46de25aed34afe3540ca0cbf3e6e209e451e
Author: Csaba Toth <csaba toth telenordigital com>
Date:   Mon Sep 9 17:13:46 2019 +0200

    Catching the correct exception at zero division

 gexiv2/gexiv2-metadata-gps.cpp | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/gexiv2/gexiv2-metadata-gps.cpp b/gexiv2/gexiv2-metadata-gps.cpp
index 47592ec..8d612df 100644
--- a/gexiv2/gexiv2-metadata-gps.cpp
+++ b/gexiv2/gexiv2-metadata-gps.cpp
@@ -89,7 +89,7 @@ gboolean gexiv2_metadata_get_gps_longitude (GExiv2Metadata *self, gdouble *longi
         return TRUE;
     } catch (Exiv2::Error &e) {
         LOG_ERROR(e);
-    } catch (std::overflow_error &e) {
+    } catch (std::invalid_argument &e) {
         LOG_ERROR(e);
     }
 
@@ -138,7 +138,7 @@ gboolean gexiv2_metadata_get_gps_latitude (GExiv2Metadata *self, gdouble *latitu
         return TRUE;
     } catch (Exiv2::Error &e) {
         LOG_ERROR(e);
-    } catch (std::overflow_error &e) {
+    } catch (std::invalid_argument &e) {
         LOG_ERROR(e);
     }
 
@@ -176,7 +176,7 @@ gboolean gexiv2_metadata_get_gps_altitude (GExiv2Metadata *self, gdouble *altitu
         return TRUE;
     } catch (Exiv2::Error &e) {
         LOG_ERROR(e);
-    } catch (std::overflow_error &e) {
+    } catch (std::invalid_argument &e) {
         LOG_ERROR(e);
     }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]