EDoC++ is a group of tools that allow developers to perform static analysis of C++ exception propagation, warning developers of dangerous exception usage and generating exception propagation documentation that can be imported into doxygen.
What this means is that by using EDoC++ to analyse your source code you can be certain that your exception handling code will not cause your program to abort, and you can document the exception specifications for a libraries API accuratly with minimal work.
It is composed of two utilities:
The first utility is a modification of the GCC compiler that gathers call-graph and exception information about the C++ source code as it is being compiled and embeds that data into the resulting binary files that can be extracted and processed by the post processing tool
Post Processing tool
The second utility is a post processing tool named "edoc" that extracts the information gathered with the modified GCC compiler and generates a complete pessimistic call-graph for the source code which it uses to determine the propagation of exceptions through the source.
The post processing tool is able to notify the developer of dangerous exception propagation that may cause a program abort. Such cases include but are not limited to:
- Exception that may propagate past a no-throw function specifier.
- Exception of invalid type may propagate past a restrictive function throw specifier that does not allow that exception type to propagate
- Exception may occur during static construction
- Exception may propagate out of main function
- Re-throw statement found outside of a catch statement
Finally in order to help libraries to produce effective exception propagation documentation with their API's EDoC++ will generate a file that can be parsed with doxygen in order to include exception propagation information for all functions in a project.