summaryrefslogtreecommitdiff
path: root/server/src/macroheaderparser.cc
diff options
context:
space:
mode:
Diffstat (limited to 'server/src/macroheaderparser.cc')
-rw-r--r--server/src/macroheaderparser.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/server/src/macroheaderparser.cc b/server/src/macroheaderparser.cc
index d6ba0bb..def80c3 100644
--- a/server/src/macroheaderparser.cc
+++ b/server/src/macroheaderparser.cc
@@ -94,11 +94,13 @@ MacroHeaderParser::~MacroHeaderParser()
void MacroHeaderParser::startTag(std::string name, std::map< std::string, std::string> attributes)
{
- // Create macro and enable parsing of queries, maps and widgets
+ if(m) return;
+
if(name == "macro") {
- assert(!m); // A Macro has already been allocated, cannot create macro!
m = new Macro();
m->attributes = attributes;
+ } else {
+ throw Exception("Missing root tag 'macro' - found '" + name + "'");
}
}