]> www.ginac.de Git - ginac.git/blobdiff - ginac/structure.pl
* fixed some mindboggling tremendous superhuge gigantic #*@$&! memory leaks.
[ginac.git] / ginac / structure.pl
index 1455825c1ecc598097dfcf275f3213173d933d55..901c5722d11da5b2f459d2d83c83a0cc3cc35b47 100755 (executable)
@@ -249,6 +249,7 @@ $implementation=<<END_OF_IMPLEMENTATION;
 ${input_structure}
 
 #include <iostream>
+#include <stdexcept>
 
 #include "${STRUCTURE}.h"
 #include "print.h"
@@ -346,8 +347,7 @@ ex & ${STRUCTURE}::let_op(int i)
        switch (i) {
 ${let_op_statements}
        }
-       errormsg("${STRUCTURE}::let_op(): should not reach this point");
-       return *new ex(fail());
+       throw(std::runtime_error("${STRUCTURE}::let_op(): should not have reached this point"));
 }
 
 ex ${STRUCTURE}::expand(unsigned options) const