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/expr_template.cpp | |
parent | ff9d2c84dae5eb21a7ef77f5931673fb23129730 (diff) |
Cleaning up throw specifiers on Exception and subclasses. (#1475)
Diffstat (limited to 'src/expr/expr_template.cpp')
-rw-r--r-- | src/expr/expr_template.cpp | 30 |
1 files changed, 16 insertions, 14 deletions
diff --git a/src/expr/expr_template.cpp b/src/expr/expr_template.cpp index 6dbc2256c..0ed3601fc 100644 --- a/src/expr/expr_template.cpp +++ b/src/expr/expr_template.cpp @@ -54,31 +54,33 @@ std::ostream& operator<<(std::ostream& out, const Expr& e) { } } -TypeCheckingException::TypeCheckingException(const TypeCheckingException& t) throw() : - Exception(t.d_msg), d_expr(new Expr(t.getExpression())) { +TypeCheckingException::TypeCheckingException(const TypeCheckingException& t) + : Exception(t.d_msg), d_expr(new Expr(t.getExpression())) +{ } -TypeCheckingException::TypeCheckingException(const Expr& expr, std::string message) throw() : - Exception(message), d_expr(new Expr(expr)) { +TypeCheckingException::TypeCheckingException(const Expr& expr, + std::string message) + : Exception(message), d_expr(new Expr(expr)) +{ } -TypeCheckingException::TypeCheckingException(ExprManager* em, - const TypeCheckingExceptionPrivate* exc) throw() : - Exception(exc->getMessage()), d_expr(new Expr(em, new Node(exc->getNode()))) { +TypeCheckingException::TypeCheckingException( + ExprManager* em, const TypeCheckingExceptionPrivate* exc) + : Exception(exc->getMessage()), + d_expr(new Expr(em, new Node(exc->getNode()))) +{ } -TypeCheckingException::~TypeCheckingException() throw() { - delete d_expr; -} +TypeCheckingException::~TypeCheckingException() { delete d_expr; } -void TypeCheckingException::toStream(std::ostream& os) const throw() { +void TypeCheckingException::toStream(std::ostream& os) const +{ os << "Error during type checking: " << d_msg << endl << "The ill-typed expression: " << *d_expr; } -Expr TypeCheckingException::getExpression() const throw() { - return *d_expr; -} +Expr TypeCheckingException::getExpression() const { return *d_expr; } Expr::Expr() : d_node(new Node), |