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; }