summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndreas Stöckel <astoecke@techfak.uni-bielefeld.de>2015-01-25 23:15:15 +0100
committerAndreas Stöckel <astoecke@techfak.uni-bielefeld.de>2015-01-25 23:15:15 +0100
commit566742c6fa0e1c689cfabd60a7989d7ad48db66c (patch)
treebe7d2e939e3a9c603bee435a035a5e80060b0e28 /src
parent27d042b203f1984e62600529edcfb5b76d0c4cc4 (diff)
Fixed missing break and context not being displayed if source file could not be parsed
Diffstat (limited to 'src')
-rw-r--r--src/core/resource/ResourceManager.cpp7
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 &registry, 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;