aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2010-12-31 18:41:42 +0000
committerDavid Robillard <d@drobilla.net>2010-12-31 18:41:42 +0000
commit2d426b8cbc3dfe24615df9cc9fb4e1ddf96de475 (patch)
tree9859156f98dbee1ec9dcacd48d340293797c63cc
parent1ce7bb6ac8143b37b1923916c4da00c6bf18c930 (diff)
downloadresp-2d426b8cbc3dfe24615df9cc9fb4e1ddf96de475.tar.gz
resp-2d426b8cbc3dfe24615df9cc9fb4e1ddf96de475.tar.bz2
resp-2d426b8cbc3dfe24615df9cc9fb4e1ddf96de475.zip
Report parsing errors.
git-svn-id: http://svn.drobilla.net/resp/resp@394 ad02d1e2-f140-0410-9f75-f8b11f17cedd
-rw-r--r--src/repl.cpp1
-rw-r--r--src/resp.cpp1
2 files changed, 2 insertions, 0 deletions
diff --git a/src/repl.cpp b/src/repl.cpp
index 50064f8..b70618e 100644
--- a/src/repl.cpp
+++ b/src/repl.cpp
@@ -35,6 +35,7 @@ readParseType(CEnv& cenv, Cursor& cursor, istream& is, const AST*& exp, const AS
try {
exp = cenv.penv.parse(cursor, is);
} catch (Error e) {
+ cerr << e.what() << endl;
is.ignore(std::numeric_limits<std::streamsize>::max(), '\n'); // Skip REPL junk
throw e;
}
diff --git a/src/resp.cpp b/src/resp.cpp
index 66847fd..2c26927 100644
--- a/src/resp.cpp
+++ b/src/resp.cpp
@@ -163,6 +163,7 @@ main(int argc, char** argv)
is.ignore(std::numeric_limits<std::streamsize>::max(), '\n'); // Skip newlines
}
} catch (Error e) {
+ cerr << e.what() << endl;
}
is.close();
}