diff options
author | Andreas Stöckel <astoecke@techfak.uni-bielefeld.de> | 2015-01-27 20:27:25 +0100 |
---|---|---|
committer | Andreas Stöckel <astoecke@techfak.uni-bielefeld.de> | 2015-01-27 20:27:25 +0100 |
commit | 34ea1fe74746577f1834b5556183cd230201146f (patch) | |
tree | d3cd1ca32cbd79347018491b0f4a12e0b45fc976 /src | |
parent | 7a959de0b1bf890c5deefdc132fe30f20661ca9b (diff) |
Fixed context not being shown when an exception was thrown in the parser
Diffstat (limited to 'src')
-rw-r--r-- | src/core/resource/ResourceManager.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/core/resource/ResourceManager.cpp b/src/core/resource/ResourceManager.cpp index 2e15c85..6b0be3a 100644 --- a/src/core/resource/ResourceManager.cpp +++ b/src/core/resource/ResourceManager.cpp @@ -94,12 +94,13 @@ NodeVector<Node> ResourceManager::parse( // We can now try to parse the given file NodeVector<Node> parsedNodes; - try { - // Set the current source id in the logger instance. Note that this - // modifies the logger instance -- the GuardedLogger is just used to - // make sure the default location is popped from the stack again. - GuardedLogger guardedLogger(logger, SourceLocation{sourceId}); + // Set the current source id in the logger instance. Note that this + // modifies the logger instance -- the GuardedLogger is just used to + // make sure the default location is popped from the stack again. + GuardedLogger guardedLogger(logger, SourceLocation{sourceId}); + + try { // Fetch the input stream and create a char reader std::unique_ptr<std::istream> is = resource.stream(); CharReader reader(*is, sourceId); |