[Mono-dev] Exception catching in C...
Robert Jordan
robertj at gmx.net
Wed Jan 3 04:38:55 EST 2007
Thomas Wiest wrote:
> Hey,
> I'm embedding Mono and I'd like to know if there's a way for C to catch
> all unhandled exceptions. From this line on the interop page, it seems
> it is possible:
>
> "It is very important that the unmanaged code not propagate any
> exceptions -- it must catch all exceptions, or else the unmanaged code
> calling the delegate will break."
This is a typo. The first "unmanaged" occurrence must be read as
"managed".
> from: http://www.mono-project.com/Interop_with_Native_Libraries
It's not possible to catch a managed exception in unmanaged code
when running on Unix.
On Windows, when using the VC compiler, you could set up a SEH
exception handler.
Robert
More information about the Mono-devel-list
mailing list