]> www.ginac.de Git - cln.git/blob - src/base/cl_notreached_exception.cc
Fix compilation error on MSVC.
[cln.git] / src / base / cl_notreached_exception.cc
1 // cl_notreached_exception().
2
3 // General includes.
4 #include "base/cl_sysdep.h"
5
6 // Specification.
7 #include "base/cl_macros.h"
8
9
10 // Implementation.
11
12 #include "cln/io.h"
13 #include <sstream>
14
15 namespace cln {
16
17 static inline const std::string
18 notreached_error_msg (const char* filename, int lineno)
19 {
20         std::ostringstream buf;
21         fprint(buf, "Internal error: statement in file ");
22         fprint(buf, filename);
23         fprint(buf, ", line ");
24         fprintdecimal(buf, lineno);
25         fprint(buf, " has been reached!!\n");
26         fprint(buf, "Please send the authors of the program a description how you produced this error!");
27         return buf.str();
28 }
29
30 notreached_exception::notreached_exception (const char* filename, int lineno)
31         : runtime_exception(notreached_error_msg(filename, lineno))
32 {}
33
34 }  // namespace cln