// Implementation.
-#include "cln/abort.h"
+#include "cln/exception.h"
#include "cl_xmacros.h"
namespace cln {
switch (b % 4) {
case 1: break;
case 3: v = -v; break;
- default: cl_abort();
+ default: throw runtime_exception();
}
continue;
}
switch (b % 8) {
case 1: case 7: break;
case 3: case 5: v = -v; break;
- default: cl_abort();
+ default: throw runtime_exception();
}
continue;
}
{
// Check b > 0, b odd.
if (!(b > 0))
- cl_abort();
+ throw runtime_exception();
if ((b & 1) == 0)
- cl_abort();
+ throw runtime_exception();
// Ensure 0 <= a < b.
if (a >= 0)
a = (uintV)a % (uintV)b;