summaryrefslogtreecommitdiffstats
path: root/src/dbusxmlscanner.cpp
diff options
context:
space:
mode:
authordimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7>2009-08-25 11:45:32 (GMT)
committerdimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7>2009-08-25 11:45:32 (GMT)
commit0c8b6ca69f951ce8c94902764cf036d6a79e5102 (patch)
tree1eb87ba34df4235398b79f257b2af06a38a3f2b2 /src/dbusxmlscanner.cpp
parent347f313fd93041ce8acf08c4927cb763d5f2d3cd (diff)
downloadDoxygen-0c8b6ca69f951ce8c94902764cf036d6a79e5102.zip
Doxygen-0c8b6ca69f951ce8c94902764cf036d6a79e5102.tar.gz
Doxygen-0c8b6ca69f951ce8c94902764cf036d6a79e5102.tar.bz2
Release-1.6.1
Diffstat (limited to 'src/dbusxmlscanner.cpp')
-rw-r--r--src/dbusxmlscanner.cpp17
1 files changed, 15 insertions, 2 deletions
diff --git a/src/dbusxmlscanner.cpp b/src/dbusxmlscanner.cpp
index 8a07d81..514039f 100644
--- a/src/dbusxmlscanner.cpp
+++ b/src/dbusxmlscanner.cpp
@@ -354,6 +354,7 @@ public:
// Interface:
if (DBUS("interface"))
{
+ CONDITION(m_currentInterface, "end of interface found without start.");
m_currentInterface->endBodyLine = lineNumber();
closeScopes();
m_currentInterface = 0;
@@ -361,6 +362,8 @@ public:
if (DBUS("method") || DBUS("signal"))
{
+ CONDITION(m_currentMethod, "end of method found without start.");
+ CONDITION(m_currentInterface, "end of method found outside interface.");
m_currentMethod->endBodyLine = lineNumber();
m_currentInterface->addSubEntry(m_currentMethod);
m_currentMethod = 0;
@@ -368,6 +371,8 @@ public:
if (DBUS("property"))
{
+ CONDITION(m_currentMethod, "end of property found without start.");
+ CONDITION(m_currentInterface, "end of property found outside interface.");
m_currentProperty->endBodyLine = lineNumber();
m_currentInterface->addSubEntry(m_currentProperty);
m_currentProperty = 0;
@@ -375,6 +380,7 @@ public:
if (DBUS("arg"))
{
+ CONDITION(m_currentMethod, "end of arg found outside method.");
m_currentMethod->argList->append(m_currentArgument);
m_currentArgument = 0;
}
@@ -382,6 +388,7 @@ public:
if (EXTENSION("namespace"))
{
Entry * current = m_namespaceStack.last();
+ CONDITION(current, "end of namespace without start.");
m_namespaceStack.removeLast();
current->endBodyLine = lineNumber();
@@ -391,6 +398,7 @@ public:
if (EXTENSION("struct"))
{
StructData * data = m_structStack.last();
+ CONDITION(data, "end of struct without start.");
data->entry->endBodyLine = lineNumber();
@@ -408,11 +416,14 @@ public:
if (EXTENSION("member"))
{
- m_structStack.last()->entry->addSubEntry(m_currentEntry);
+ StructData * data = m_structStack.last();
+ CONDITION(data, "end of struct without start");
+ data->entry->addSubEntry(m_currentEntry);
}
if (EXTENSION("enum") || EXTENSION("flagset"))
{
+ CONDITION(m_currentEnum, "end of enum without start");
m_currentEnum->endBodyLine = lineNumber();
closeScopes();
@@ -421,6 +432,7 @@ public:
if (EXTENSION("value"))
{
+ CONDITION(m_currentEntry, "end of value without start");
m_currentEntry->endBodyLine = lineNumber();
m_currentEnum->addSubEntry(m_currentEntry);
@@ -847,7 +859,8 @@ void DBusXMLScanner::parseInput(const char * fileName,
reader.parse(inputSource);
if (handler.errorString())
- { err("ERROR parsing XML: %s\n", handler.errorString().utf8().data()); }
+ { err("DBus XML Parser: Error at line %d: %s\n",
+ handler.locator()->lineNumber(),handler.errorString().utf8().data()); }
groupLeaveFile(fileName, 1);
}