aboutsummaryrefslogtreecommitdiff
path: root/Parser.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Parser.cpp')
-rw-r--r--Parser.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/Parser.cpp b/Parser.cpp
index c8a90b4..50833d8 100644
--- a/Parser.cpp
+++ b/Parser.cpp
@@ -60,7 +60,12 @@ void Parser::parse(istream & input) {
}
if (circuit == nullptr) throw ParserException("circuit is not initialized!");
- circuit->create(label, nodes);
+
+ try {
+ circuit->create(label, nodes);
+ } catch(CircuitException & c) {
+ throw ParserException("Circuit error on line %u: %s", linenum, c.what());
+ }
}
}