Keywords: doc

Next: Throwing Exceptions Up: C++ mapping Previous: Modules

# Exceptions

MICO's exceptions handling capabilities suffer a lot from the limited exceptions handling support in the GNU C++ compiler, namely:

- exception handling is only supported on very few platforms, notably on Sun SPARC, Intel x86, Motorola 68k, and IBM RS/6000.
- throwing class `X` and catching a base class of `X` does only work if you turn on Runtime Type Information (RTTI) support by using the `-frtti` option. But if you compile one file using `-frtti` you have to compile all files using this option, including the iostream- and all other C++ libraries. Besides this g++'s RTTI support ist still very buggy.
- you cannot throw exceptions from a shared library into user code (trying this gives you a segmentation fault).
- there seems to be a memory leak in the compiler generated exception handling code.

These limitations are the reason for the somewhat strange exception handling design in the current version of MICO.

- Throwing Exceptions
- Catching Exceptions