Chapter 15. History

Table of Contents

Motivation
Origins

Motivation

EDoc++ was started in early 2005 due to a need to have accurate documentation for C++ exception propogation. I wanted to use exceptions for my error handling code as exceptions can produce clean easy to maintain code. However the use of exceptions in C++ is more dangerous than in many other languages. In Java for example the function to be called documents all the exceptions it may throw, and this is made compulsory by the compiler. This way you know exactly what exceptions may occur when you are using a particular function. To use a similar functionality in C++ (The function throw specifier) is dangerous as if an exception does occur that does not match the specs, then it causes the program to abort. In addition to this the compiler provides no mechanism to enforce this specification at compile time anyway. The combination of these two along with the normal problems of resource leaks in a non-garbage collected language make it quite difficult to use exceptions in C++ and produce reliable safe code. By creating this tool I have managed to alleviate some of the dangers of using exceptions in C++ code that other languages have addressed suficiently as part of the core language.