aboutsummaryrefslogtreecommitdiffstats
path: root/tuplr.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2009-06-18 20:40:31 +0000
committerDavid Robillard <d@drobilla.net>2009-06-18 20:40:31 +0000
commitd8c876402bb348abc7d1fb539f245e7ba8c4ce27 (patch)
tree2b104ffa8d054e524f7fdfbf27052700b2e19cbe /tuplr.cpp
parent545b524bda45f2087ac92cf58f6eaa78499332cf (diff)
downloadresp-d8c876402bb348abc7d1fb539f245e7ba8c4ce27.tar.gz
resp-d8c876402bb348abc7d1fb539f245e7ba8c4ce27.tar.bz2
resp-d8c876402bb348abc7d1fb539f245e7ba8c4ce27.zip
THROW_IF macro.
git-svn-id: http://svn.drobilla.net/resp/tuplr@120 ad02d1e2-f140-0410-9f75-f8b11f17cedd
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 {