diff options
author | Andreas Stöckel <astoecke@techfak.uni-bielefeld.de> | 2015-01-25 23:15:15 +0100 |
---|---|---|
committer | Andreas Stöckel <astoecke@techfak.uni-bielefeld.de> | 2015-01-25 23:15:15 +0100 |
commit | 566742c6fa0e1c689cfabd60a7989d7ad48db66c (patch) | |
tree | be7d2e939e3a9c603bee435a035a5e80060b0e28 /src/core/resource | |
parent | 27d042b203f1984e62600529edcfb5b76d0c4cc4 (diff) |
Fixed missing break and context not being displayed if source file could not be parsed
Diffstat (limited to 'src/core/resource')
-rw-r--r-- | src/core/resource/ResourceManager.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/core/resource/ResourceManager.cpp b/src/core/resource/ResourceManager.cpp index 03fd65b..11d01a7 100644 --- a/src/core/resource/ResourceManager.cpp +++ b/src/core/resource/ResourceManager.cpp @@ -103,22 +103,21 @@ Rooted<Node> ResourceManager::parse(Registry ®istry, ParserContext &ctx, ParserScope scope; // New empty parser scope instance ParserContext childCtx = ctx.clone(scope, sourceId); node = req.getParser()->parse(reader, childCtx); + break; } case ParseMode::INCLUDE: { ParserContext childCtx = ctx.clone(sourceId); node = req.getParser()->parse(reader, childCtx); + break; } } } if (node == nullptr) { - throw LoggableException{"File \"" + resource.getLocation() + + throw LoggableException{"Requested file \"" + resource.getLocation() + "\" cannot be parsed."}; } } catch (LoggableException ex) { - // Remove all data associated with the allocated source id - purgeResource(sourceId); - // Log the exception and return nullptr ctx.getLogger().log(ex); return nullptr; |