From 2d426b8cbc3dfe24615df9cc9fb4e1ddf96de475 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Fri, 31 Dec 2010 18:41:42 +0000 Subject: Report parsing errors. git-svn-id: http://svn.drobilla.net/resp/resp@394 ad02d1e2-f140-0410-9f75-f8b11f17cedd --- src/repl.cpp | 1 + src/resp.cpp | 1 + 2 files changed, 2 insertions(+) (limited to 'src') 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::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::max(), '\n'); // Skip newlines } } catch (Error e) { + cerr << e.what() << endl; } is.close(); } -- cgit v1.2.1