4 #include "base/cl_sysdep.h"
7 #include "cln/exception.h"
13 #include "base/cl_N.h"
18 static inline const std::string
19 as_error_msg (const cl_number& obj, const char * typestring, const char * filename, int line)
21 std::ostringstream buf;
22 fprint(buf, "Type assertion failed: in file ");
23 fprint(buf, filename);
24 fprint(buf, ", line ");
25 fprintdecimal(buf, line);
26 fprint(buf, ", not ");
27 fprint(buf, typestring);
29 #if 0 // This brings in a dependency from the complex and float printer and all the float stuff.
33 fprinthexadecimal(buf, (unsigned long)(void*)&obj);
35 fprinthexadecimal(buf, (unsigned long)obj.word);
40 as_exception::as_exception (const cl_number& obj, const char * typestring, const char * filename, int line)
41 : runtime_exception(as_error_msg(obj, typestring, filename, line))