acc: turn some assertions into exceptions

* spot/misc/bitset.cc, spot/misc/bitset.hh (set, clear):
Turn asserts into exceptions.
* spot/twa/acc.hh (mark_t): As a consequence, the
constructor is not noexcept anymore.
* tests/core/acc.cc, tests/python/except.py: More tests.
This commit is contained in:
Alexandre Duret-Lutz 2018-05-26 09:44:18 +02:00
parent be0997c97a
commit 6d9d35c985
5 changed files with 46 additions and 6 deletions

View file

@ -19,6 +19,7 @@
#include "config.h"
#include <spot/misc/bitset.hh>
#include <stdexcept>
namespace spot
{
@ -28,5 +29,10 @@ namespace spot
{
throw std::runtime_error("bit shift by more bits than supported");
}
void report_bit_out_of_bounds()
{
throw std::runtime_error("bit index is out of bounds");
}
}
}