Commit d62d8482 authored by Alexandre Duret-Lutz's avatar Alexandre Duret-Lutz
Browse files

ltsmin: catch exceptions by reference

* spot/ltsmin/ltsmin.cc, tests/ltsmin/modelcheck.cc: Here.
parent 3f715216
...@@ -1112,7 +1112,7 @@ namespace spot ...@@ -1112,7 +1112,7 @@ namespace spot
{ {
convert_aps(to_observe, iface, dict, dead, *ps); convert_aps(to_observe, iface, dict, dead, *ps);
} }
catch (std::runtime_error) catch (const std::runtime_error&)
{ {
delete ps; delete ps;
dict->unregister_all_my_variables(iface.get()); dict->unregister_all_my_variables(iface.get());
......
// -*- coding: utf-8 -*- // -*- coding: utf-8 -*-
// Copyright (C) 2011, 2012, 2013, 2014, 2015, 2016 Laboratoire de // Copyright (C) 2011, 2012, 2013, 2014, 2015, 2016, 2017 Laboratoire de
// Recherche et Developpement de l'Epita (LRDE) // Recherche et Developpement de l'Epita (LRDE)
// //
// This file is part of Spot, a model checking library. // This file is part of Spot, a model checking library.
...@@ -282,7 +282,7 @@ checked_main(int argc, char **argv) ...@@ -282,7 +282,7 @@ checked_main(int argc, char **argv)
{ {
res = ec->check(); res = ec->check();
} }
catch (std::bad_alloc) catch (const std::bad_alloc&)
{ {
std::cerr << "Out of memory during emptiness check." std::cerr << "Out of memory during emptiness check."
<< std::endl; << std::endl;
...@@ -326,7 +326,7 @@ checked_main(int argc, char **argv) ...@@ -326,7 +326,7 @@ checked_main(int argc, char **argv)
{ {
run = res->accepting_run(); run = res->accepting_run();
} }
catch (std::bad_alloc) catch (const std::bad_alloc&)
{ {
std::cerr << "Out of memory while looking for counterexample." std::cerr << "Out of memory while looking for counterexample."
<< std::endl; << std::endl;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment