Well, generally speaking, exception handling is highly dependent on the operating system. I am going to make some assumptions and try to give some general recommendations. Please know that this is by no means an exhaustive answer, but should serve as a place to start.
I will assume that:
For the most part, you are interested in protecting against memory leaks.
Windows ( - ), dlopen ( LoadLibrary)
++. mini howto dlopen ++
, , , , , * nix Windows.
( ++ ? , ) try-catch.
, (SIGSEGV, SIGFPE ..):
POSIX, sigaction...
, , . SIGSEG sigaction ( .init-), . SA_STACK, , , , SA_SIGINFO, , .
- GNU libc
++: try-catch,
{ Foo();
}
() { // -
}
foo - , dll . ++ dlopen mini-howto ..
, , , .