From 34ea1fe74746577f1834b5556183cd230201146f Mon Sep 17 00:00:00 2001 From: Andreas Stöckel Date: Tue, 27 Jan 2015 20:27:25 +0100 Subject: Fixed context not being shown when an exception was thrown in the parser --- src/core/resource/ResourceManager.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src/core/resource/ResourceManager.cpp') 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 ResourceManager::parse( // We can now try to parse the given file NodeVector 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 is = resource.stream(); CharReader reader(*is, sourceId); -- cgit v1.2.3