diff options
author | Mike Arthur <mike@kdab.net> | 2010-03-19 12:20:23 +0100 |
---|---|---|
committer | Kent Hansen <kent.hansen@nokia.com> | 2010-03-19 12:20:23 +0100 |
commit | fa393b2f059caf9e44f0b2e02128112b13b33d0b (patch) | |
tree | 97b1a4739ad4265e927e5d5e49d8aa6fe1a776e3 /generator/asttoxml.cpp | |
parent | 0bc6b7c2547b618969f276eedcf6da6d772d9ab3 (diff) |
Add support for throwing exceptions through the bindings to allow compilation
of code that already uses exceptions.
Merge-request: 1853
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
Diffstat (limited to 'generator/asttoxml.cpp')
-rw-r--r-- | generator/asttoxml.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/generator/asttoxml.cpp b/generator/asttoxml.cpp index a215eaf..0c351ac 100644 --- a/generator/asttoxml.cpp +++ b/generator/asttoxml.cpp @@ -139,6 +139,12 @@ void writeOutFunction(QXmlStreamWriter &s, FunctionModelItem &item) { s.writeStartElement("function"); s.writeAttribute("name", qualified_name); + if (!item->exception().isEmpty()) { + s.writeStartElement("exception"); + s.writeAttribute("throw", item->exception()); + s.writeEndElement(); + } + ArgumentList arguments = item->arguments(); for(int i=0; i < arguments.size() ; i++) { s.writeStartElement("argument"); |