A compiler from Doxygen XML to reStructuredText -- hence, the name. It parses XML databases generated by Doxygen and produces reStructuredText for the Python documentation generator Sphinx.
MIT License
306
stars
23
forks
source link
Doxyrest is not processing/generating C++ throw statements / exceptions #56
/**
* \brief This is a testing class for doxyrest.
*/
class TestDoxyrest {
public:
/**
* \brief Sets a custom value.
*
* \param value a new value.
* \throws std::runtime_error in case the value is invalid.
*/
void setNewValue(double value);
};
Using Doxygen, we can generate the following HTML piece:
Note that Doxygen generates a tag with kind="exception":
<parameterlist kind="exception"><parameteritem>
<parameternamelist>
<parametername>std::runtime_error</parametername>
</parameternamelist>
<parameterdescription>
<para>in case the value is invalid. </para>
</parameterdescription>
</parameteritem>
</parameterlist>
Now, Doxyrest is unable to identify kind="exception" and only adds it to the list of regular parameters. This is the RST generated by Doxyrest:
.. index:: pair: class; TestDoxyrest
.. _doxid-class_test_doxyrest:
class TestDoxyrest
==================
.. toctree::
:hidden:
Overview
~~~~~~~~
This is a testing class for doxyrest. :ref:`More...<details-class_test_doxyrest>`
.. ref-code-block:: cpp
:class: doxyrest-overview-code-block
class TestDoxyrest {
public:
// methods
void :ref:`setNewValue<doxid-class_test_doxyrest_1aeebf9e659e590a27b2c42601d0b65c3b>`(double value);
};
.. _details-class_test_doxyrest:
Detailed Documentation
~~~~~~~~~~~~~~~~~~~~~~
This is a testing class for doxyrest.
Methods
-------
.. index:: pair: function; setNewValue
.. _doxid-class_test_doxyrest_1aeebf9e659e590a27b2c42601d0b65c3b:
.. ref-code-block:: cpp
:class: doxyrest-title-code-block
void setNewValue(double value)
Sets a custom value.
.. rubric:: Parameters:
.. list-table::
:widths: 20 80
*
- value
- a new value.
*
- std::runtime_error
- in case the value is invalid.
One can note that the exception is added to the regular parameter list when it should have a separate rubric.
Suppose we have the following class:
Using Doxygen, we can generate the following HTML piece:
And the following XML content:
Note that Doxygen generates a tag with
kind="exception"
:Now, Doxyrest is unable to identify
kind="exception"
and only adds it to the list of regular parameters. This is the RST generated by Doxyrest:One can note that the exception is added to the regular parameter list when it should have a separate rubric.
My environment:
I do appreciate your help since I have a large library with too many "throws" to document.