From 657499e98128ac5f4485ff9875fc62a516ecefea Mon Sep 17 00:00:00 2001 From: sfan5 Date: Sat, 20 Oct 2018 22:38:09 +0200 Subject: [PATCH] Fix incorrect exception types --- include/util.h | 2 +- mapper.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/util.h b/include/util.h index 1c7d397..2818e3a 100644 --- a/include/util.h +++ b/include/util.h @@ -10,7 +10,7 @@ inline std::string read_setting_default(const std::string &name, std::istream &i { try { return read_setting(name, is); - } catch(std::runtime_error e) { + } catch(std::runtime_error &e) { return def; } } diff --git a/mapper.cpp b/mapper.cpp index 6aef4ff..dccfaeb 100644 --- a/mapper.cpp +++ b/mapper.cpp @@ -221,7 +221,7 @@ int main(int argc, char *argv[]) generator.parseColorsFile(colors); generator.generate(input, output); - } catch(std::runtime_error e) { + } catch(std::runtime_error &e) { std::cerr << "Exception: " << e.what() << std::endl; return 1; }