diff options
Diffstat (limited to 'server/src/templateheaderparser.cc')
-rw-r--r-- | server/src/templateheaderparser.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/server/src/templateheaderparser.cc b/server/src/templateheaderparser.cc index 8698e05..0b274ee 100644 --- a/server/src/templateheaderparser.cc +++ b/server/src/templateheaderparser.cc @@ -94,11 +94,13 @@ TemplateHeaderParser::~TemplateHeaderParser() void TemplateHeaderParser::startTag(std::string name, std::map< std::string, std::string> attributes) { - // Create template and enable parsing of queries, maps and widgets + if(t) return; + if(name == "template") { - assert(!t); // A Template has already been allocated, cannot create template! t = new Template(); t->attributes = attributes; + } else { + throw Exception("Missing root tag 'template' - found '" + name + "'"); } } |