]> www.ginac.de Git - cln.git/blobdiff - src/integer/conv/cl_I_to_UQ.cc
Remove exception hooks in favor of real C++ exceptions:
[cln.git] / src / integer / conv / cl_I_to_UQ.cc
index 2dd15ed6c19569a947b07ee7b265b3b27d44200f..5f30e502f9a4550878d9cc86a245b0283325fe27 100644 (file)
@@ -15,7 +15,8 @@
 #include "cl_DS.h"
 #include "cln/io.h"
 #include "cln/integer_io.h"
-#include "cln/abort.h"
+#include "cln/exception.h"
+#include <sstream>
 
 namespace cln {
 
@@ -91,10 +92,10 @@ uint64 cl_I_to_UQ (const cl_I& obj)
                #undef IF_LENGTH
        }
        bad: // unpassendes Objekt
-       fprint(std::cerr, "Not a 64-bit integer: ");
-       fprint(std::cerr, obj);
-       fprint(std::cerr, "\n");
-       cl_abort();
+       std::ostringstream buf;
+       fprint(buf, "Not a 64-bit integer: ");
+       fprint(buf, obj);
+       throw runtime_exception(buf.str());
 }
 
 }  // namespace cln