summaryrefslogtreecommitdiff
path: root/src/expr
diff options
context:
space:
mode:
Diffstat (limited to 'src/expr')
-rw-r--r--src/expr/node.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/expr/node.cpp b/src/expr/node.cpp
index 2b5c0a2c8..cf9a772b7 100644
--- a/src/expr/node.cpp
+++ b/src/expr/node.cpp
@@ -18,6 +18,7 @@
#include <iostream>
#include <cstring>
+#include "base/exception.h"
#include "base/output.h"
#include "expr/attribute.h"
@@ -31,8 +32,10 @@ TypeCheckingExceptionPrivate::TypeCheckingExceptionPrivate(TNode node,
Exception(message),
d_node(new Node(node)) {
#ifdef CVC4_DEBUG
- // yes, this leaks memory, but only in debug modes with exceptions occurring
- s_debugLastException = strdup(toString().c_str());
+ LastExceptionBuffer* current = LastExceptionBuffer::getCurrent();
+ if(current != NULL){
+ current->setContents(toString().c_str());
+ }
#endif /* CVC4_DEBUG */
}
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback