[gexiv2] Add missing include



commit baf4f5ccedf5407d341de67df0a47362443ebfbf
Author: Jens Georg <mail jensge org>
Date:   Wed Apr 5 20:14:34 2017 +0200

    Add missing include
    
    And while at it, use a more fitting exception
    
    Signed-off-by: Jens Georg <mail jensge org>
    
    https://bugzilla.gnome.org/show_bug.cgi?id=780709
    https://bugs.gentoo.org/show_bug.cgi?id=613778

 gexiv2/gexiv2-metadata-gps.cpp |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/gexiv2/gexiv2-metadata-gps.cpp b/gexiv2/gexiv2-metadata-gps.cpp
index b3ed5d5..d49d97c 100644
--- a/gexiv2/gexiv2-metadata-gps.cpp
+++ b/gexiv2/gexiv2-metadata-gps.cpp
@@ -12,6 +12,7 @@
 #include "gexiv2-metadata-private.h"
 #include <string>
 #include <cmath>
+#include <stdexcept>
 #include <stdio.h>
 #include <glib-object.h>
 #include <exiv2/exif.hpp>
@@ -26,7 +27,7 @@ static double convert_rational(const Exiv2::Rational& r) {
     }
 
     if (r.second == 0) {
-        throw std::overflow_error("Invalid fraction");
+        throw std::invalid_argument("Invalid fraction");
     }
 
     double num = static_cast<double>(r.first);


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