Using the C++ Math Library    

Appendix B

Exception Classes


Overview

The MATLAB C++ Math Library defines a hierarchy of 10 exception classes with mwException as the base class. The root class, mwException, has two children: mwLogicError and mwRuntimeError. Most of the exception classes are children of mwRuntimeError. The following figure illustrates this hierarchy.

You can make use of these exception classes in your own code. You may even derive further exception classes from the ones presented here. For examples of how to derive a class from mwException or one of its subclasses, see the file
stdexcpt.h in the extern/include/cpp directory of your installation.


 <matlab>\extern\examples\cppmath Exception Class Descriptions