From acff9698a9ac2f087586131288f070975f8765c3 Mon Sep 17 00:00:00 2001 From: Etienne Renault Date: Wed, 28 Mar 2018 10:44:26 +0200 Subject: [PATCH] modelcheck: capture exceptions by const reference * tests/ltsmin/modelcheck.cc: here. --- tests/ltsmin/modelcheck.cc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/ltsmin/modelcheck.cc b/tests/ltsmin/modelcheck.cc index 12f08f9ff..55b0d7228 100644 --- a/tests/ltsmin/modelcheck.cc +++ b/tests/ltsmin/modelcheck.cc @@ -269,7 +269,7 @@ static int checked_main() model = spot::ltsmin_model::load(mc_options.model) .kripke(&ap, dict, deadf, mc_options.compress); } - catch (std::runtime_error& e) + catch (const std::runtime_error& e) { std::cerr << e.what() << '\n'; } @@ -322,7 +322,7 @@ static int checked_main() { res = ec->check(); } - catch (std::bad_alloc&) + catch (const std::bad_alloc&) { std::cerr << "Out of memory during emptiness check." << std::endl; @@ -357,7 +357,7 @@ static int checked_main() { run = res->accepting_run(); } - catch (std::bad_alloc&) + catch (const std::bad_alloc&) { std::cerr << "Out of memory while looking for counterexample." << std::endl; @@ -429,7 +429,7 @@ static int checked_main() .kripkecube(propcube->get_ap(), deadf, mc_options.compress, mc_options.nb_threads); } - catch (std::runtime_error& e) + catch (const std::runtime_error& e) { std::cerr << e.what() << '\n'; } @@ -535,7 +535,7 @@ static int checked_main() .kripkecube({}, deadf, mc_options.compress, mc_options.nb_threads); } - catch (std::runtime_error& e) + catch (const std::runtime_error& e) { std::cerr << e.what() << '\n'; } @@ -631,7 +631,7 @@ static int checked_main() .kripkecube({}, deadf, mc_options.compress, mc_options.nb_threads); } - catch (std::runtime_error& e) + catch (const std::runtime_error& e) { std::cerr << e.what() << '\n'; } -- GitLab