summaryrefslogtreecommitdiff
path: root/server/src/templatelist.cc
diff options
context:
space:
mode:
Diffstat (limited to 'server/src/templatelist.cc')
-rw-r--r--server/src/templatelist.cc11
1 files changed, 8 insertions, 3 deletions
diff --git a/server/src/templatelist.cc b/server/src/templatelist.cc
index 2e6f176..cdf2b4b 100644
--- a/server/src/templatelist.cc
+++ b/server/src/templatelist.cc
@@ -63,9 +63,14 @@ TemplateList::TemplateList(std::string templatepath)
std::vector<std::string>::iterator i = templates.begin();
while(i != templates.end()) {
TemplateHeaderParser parser(templatepath + "/" + *i);
- parser.parse();
- Template *templ = parser.getTemplate();
- (*this)[templ->attributes["name"]][VersionStr(templ->attributes["version"])] = *i;
+ try {
+ parser.parse();
+ Template *templ = parser.getTemplate();
+ (*this)[templ->attributes["name"]][VersionStr(templ->attributes["version"])] = *i;
+ } catch(Exception &e) {
+ PRACRO_WARN(templatelist, "Skipping %s: %s\n", i->c_str(), e.what());
+ }
+
i++;
}