aboutsummaryrefslogtreecommitdiffstats
path: root/tuplr.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tuplr.cpp')
-rw-r--r--tuplr.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/tuplr.cpp b/tuplr.cpp
index c13b9bc..fbd3bd3 100644
--- a/tuplr.cpp
+++ b/tuplr.cpp
@@ -72,7 +72,7 @@ readExpression(Cursor& cur, istream& in)
while (int c = readChar(cur, in)) {
switch (c) {
case EOF:
- if (!stk.empty()) throw Error("unexpected end of file", cur);
+ THROW_IF(!stk.empty(), "unexpected end of file", cur)
return SExp(cur);
case ';':
while ((c = readChar(cur, in)) != '\n') {}
@@ -127,7 +127,7 @@ readExpression(Cursor& cur, istream& in)
inline SExp
macDef(PEnv& penv, const SExp& exp)
{
- if (exp.size() != 3) throw Error("`def' requires exactly 2 arguments", exp.loc);
+ THROW_IF(exp.size() != 3, "[MAC] `def' requires exactly 2 arguments", exp.loc)
if (exp.at(1).type == SExp::ATOM) {
return exp;
} else {