]> www.ginac.de Git - cln.git/blob - src/integer/bitwise/cl_I_ash_exception.cc
Make scale_float() not throw a floating_point_underflow_exception...
[cln.git] / src / integer / bitwise / cl_I_ash_exception.cc
1 // ash_exception().
2
3 // General includes.
4 #include "base/cl_sysdep.h"
5
6 // Specification.
7 #include "cln/integer.h"
8
9
10 // Implementation.
11 #include "cln/io.h"
12 #include "cln/integer_io.h"
13 #include <sstream>
14
15 namespace cln {
16
17 static inline const std::string
18 ash_error_msg (const cl_I& badamount)
19 {
20         std::ostringstream buf;
21         fprint(buf, "ash: too large shift amount: ");
22         fprint(buf, badamount);
23         return buf.str();
24 }
25
26 ash_exception::ash_exception (const cl_I& badamount)
27         : runtime_exception(ash_error_msg(badamount))
28 {}
29
30 }  // namespace cln