elif i.attrib['kind'] == 'retval':
out.return_values += [(name.text, description)]
elif i.attrib['kind'] == 'exception':
- out.exceptions += [(name.text, description)]
+ ref = name.find('ref')
+ if (ref != None):
+ out.exceptions += [(parse_ref(state, ref), description)]
+ else:
+ out.exceptions += [(name.text, description)]
else:
assert i.attrib['kind'] == 'templateparam'
out.templates[name.text] = description
--- /dev/null
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="UTF-8" />
+ <title>File.h file | My Project</title>
+ <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:400,400i,600,600i%7CSource+Code+Pro:400,400i,600" />
+ <link rel="stylesheet" href="m-dark+documentation.compiled.css" />
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+</head>
+<body>
+<header><nav id="navigation">
+ <div class="m-container">
+ <div class="m-row">
+ <a href="index.html" id="m-navbar-brand" class="m-col-t-8 m-col-m-none m-left-m">My Project</a>
+ </div>
+ </div>
+</nav></header>
+<main><article>
+ <div class="m-container m-container-inflatable">
+ <div class="m-row">
+ <div class="m-col-l-10 m-push-l-1">
+ <h1>
+ File.h <span class="m-thin">file</span>
+ </h1>
+ <p>A file.</p>
+ <div class="m-block m-default">
+ <h3>Contents</h3>
+ <ul>
+ <li>
+ Reference
+ <ul>
+ <li><a href="#nested-classes">Classes</a></li>
+ <li><a href="#func-members">Functions</a></li>
+ </ul>
+ </li>
+ </ul>
+ </div>
+ <section id="nested-classes">
+ <h2><a href="#nested-classes">Classes</a></h2>
+ <dl class="m-doc">
+ <dt>
+ struct <a href="structMyException.html" class="m-doc">MyException</a>
+ </dt>
+ <dd>An exception.</dd>
+ </dl>
+ </section>
+ <section id="func-members">
+ <h2><a href="#func-members">Functions</a></h2>
+ <dl class="m-doc">
+ <dt>
+ <span class="m-doc-wrap-bumper">void <a href="#ac07863d69ae41a4e395b31f73b35fbcd" class="m-doc">foo</a>(</span><span class="m-doc-wrap">)</span>
+ </dt>
+ <dd>A function that throws.</dd>
+ </dl>
+ </section>
+ <section>
+ <h2>Function documentation</h2>
+ <section class="m-doc-details" id="ac07863d69ae41a4e395b31f73b35fbcd"><div>
+ <h3>
+ <span class="m-doc-wrap-bumper">void </span><span class="m-doc-wrap"><span class="m-doc-wrap-bumper"><a href="#ac07863d69ae41a4e395b31f73b35fbcd" class="m-doc-self">foo</a>(</span><span class="m-doc-wrap">)</span></span>
+ </h3>
+ <p>A function that throws.</p>
+ <table class="m-table m-fullwidth m-flat">
+ <thead>
+ <tr><th colspan="2">Exceptions</th></tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td style="width: 1%">std::runtime_exception</td>
+ <td>This one doesn't have a reference</td>
+ </tr>
+ <tr>
+ <td><a href="structMyException.html" class="m-doc">MyException</a></td>
+ <td>This one does</td>
+ </tr>
+ </tbody>
+ </table>
+ </div></section>
+ </section>
+ </div>
+ </div>
+ </div>
+</article></main>
+</body>
+</html>
self.assertEqual(*self.actual_expected_contents('modules.html'))
self.assertEqual(*self.actual_expected_contents('namespaces.html'))
self.assertEqual(*self.actual_expected_contents('pages.html'))
+
+class ExceptionReference(IntegrationTestCase):
+ def __init__(self, *args, **kwargs):
+ super().__init__(__file__, 'exception_reference', *args, **kwargs)
+
+ def test(self):
+ self.run_doxygen(wildcard='*.xml')
+ self.assertEqual(*self.actual_expected_contents('File_8h.html'))