From c3dbbec39aef32789aacb872c88801f0c5d15ef7 Mon Sep 17 00:00:00 2001 From: "Matthias P. Braendli" Date: Mon, 28 Jan 2019 17:13:52 +0100 Subject: Catch all exceptions as const --- src/MemlessPoly.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/MemlessPoly.cpp') diff --git a/src/MemlessPoly.cpp b/src/MemlessPoly.cpp index 07e4c1a..ef77c07 100644 --- a/src/MemlessPoly.cpp +++ b/src/MemlessPoly.cpp @@ -420,7 +420,7 @@ void MemlessPoly::set_parameter(const string& parameter, const string& value) load_coefficients(coefs_fstream); m_coefs_file = value; } - catch (std::runtime_error &e) { + catch (const std::runtime_error &e) { throw ParameterError(e.what()); } } @@ -434,7 +434,7 @@ void MemlessPoly::set_parameter(const string& parameter, const string& value) ofstream coefs_fstream(m_coefs_file); coefs_fstream << value; } - catch (std::runtime_error &e) { + catch (const std::runtime_error &e) { throw ParameterError(e.what()); } } -- cgit v1.2.3