diff options
author | Tim King <taking@cs.nyu.edu> | 2018-01-09 22:05:02 -0800 |
---|---|---|
committer | Andres Noetzli <andres.noetzli@gmail.com> | 2018-01-09 22:05:02 -0800 |
commit | 2e5cc613d280fab1be89d8360250cbc3a1635ac9 (patch) | |
tree | ced7d813eec67a32fd3f1b4a1174f5ff00ab1767 /src/expr/node.cpp | |
parent | ff9d2c84dae5eb21a7ef77f5931673fb23129730 (diff) |
Cleaning up throw specifiers on Exception and subclasses. (#1475)
Diffstat (limited to 'src/expr/node.cpp')
-rw-r--r-- | src/expr/node.cpp | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/src/expr/node.cpp b/src/expr/node.cpp index 126feadd8..110925f41 100644 --- a/src/expr/node.cpp +++ b/src/expr/node.cpp @@ -27,9 +27,9 @@ using namespace std; namespace CVC4 { TypeCheckingExceptionPrivate::TypeCheckingExceptionPrivate(TNode node, - std::string message) throw() : - Exception(message), - d_node(new Node(node)) { + std::string message) + : Exception(message), d_node(new Node(node)) +{ #ifdef CVC4_DEBUG LastExceptionBuffer* current = LastExceptionBuffer::getCurrent(); if(current != NULL){ @@ -38,21 +38,25 @@ TypeCheckingExceptionPrivate::TypeCheckingExceptionPrivate(TNode node, #endif /* CVC4_DEBUG */ } -TypeCheckingExceptionPrivate::~TypeCheckingExceptionPrivate() throw () { - delete d_node; -} +TypeCheckingExceptionPrivate::~TypeCheckingExceptionPrivate() { delete d_node; } -void TypeCheckingExceptionPrivate::toStream(std::ostream& os) const throw() { +void TypeCheckingExceptionPrivate::toStream(std::ostream& os) const +{ os << "Error during type checking: " << d_msg << std::endl << *d_node << endl << "The ill-typed expression: " << *d_node; } -NodeTemplate<true> TypeCheckingExceptionPrivate::getNode() const throw() { +NodeTemplate<true> TypeCheckingExceptionPrivate::getNode() const +{ return *d_node; } -UnknownTypeException::UnknownTypeException(TNode n) throw() : - TypeCheckingExceptionPrivate(n, "this expression contains an element of unknown type (such as an abstract value);" - " its type cannot be computed until it is substituted away") { +UnknownTypeException::UnknownTypeException(TNode n) + : TypeCheckingExceptionPrivate( + n, + "this expression contains an element of unknown type (such as an " + "abstract value);" + " its type cannot be computed until it is substituted away") +{ } /** Is this node constant? (and has that been computed yet?) */ |