summaryrefslogtreecommitdiff
path: root/src/expr/expr_manager_template.cpp
diff options
context:
space:
mode:
authorDejan Jovanović <dejan.jovanovic@gmail.com>2010-05-04 03:42:56 +0000
committerDejan Jovanović <dejan.jovanovic@gmail.com>2010-05-04 03:42:56 +0000
commit1ce8e28d5976e1ab30099cb9e6943514497d2980 (patch)
tree1a9382fb62b38e3b5768da951b7c684f1b8688e7 /src/expr/expr_manager_template.cpp
parent69c2d3e702f8ec0bd0eec4a481a07571131aabeb (diff)
Type-checking classes and hooks (not tested yet).
Diffstat (limited to 'src/expr/expr_manager_template.cpp')
-rw-r--r--src/expr/expr_manager_template.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/expr/expr_manager_template.cpp b/src/expr/expr_manager_template.cpp
index b957019fb..03a54d49b 100644
--- a/src/expr/expr_manager_template.cpp
+++ b/src/expr/expr_manager_template.cpp
@@ -229,9 +229,15 @@ SortType ExprManager::mkSort(const std::string& name) {
return Type(d_nodeManager, new TypeNode(d_nodeManager->mkSort(name)));
}
-Type ExprManager::getType(const Expr& e) {
+Type ExprManager::getType(const Expr& e) throw (TypeCheckingException) {
NodeManagerScope nms(d_nodeManager);
- return Type(d_nodeManager, new TypeNode(d_nodeManager->getType(e.getNode())));
+ Type t;
+ try {
+ t = Type(d_nodeManager, new TypeNode(d_nodeManager->getType(e.getNode())));
+ } catch (const TypeCheckingExceptionPrivate& e) {
+ throw TypeCheckingException(Expr(this, new Node(e.getNode())), e.getMessage());
+ }
+ return t;
}
Expr ExprManager::mkVar(const std::string& name, const Type& type) {
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback