digitalmars.D.learn - exception handling and dynamic loading
- Carl Sturtivant (15/15) Mar 07 2014 I am loading my own small dynamic library of functions, using
- Dicebot (4/5) Mar 07 2014 This is the main problem. All recent work Martin Nowak has done
I am loading my own small dynamic library of functions, using Runtime.loadLibrary in core.runtime and want an exception thrown in a function in the dynamic library to be caught close to where I call it, which is of course in the program that's doing the dynamic loading. How do I get the exception mechanism to collaborate properly in this situation? The document asserts that the runtime in the dynamic library is integrated with that in the main program, but any exception I throw in the dynamic library causes a fatal crash. Exceptions thrown in my main program are caught properly with no problems. I'm using DMD32 D Compiler v2.064 on windows, and I followed the advice in http://dlang.org/dll.html as well as having a proper winMain function as defined here http://wiki.dlang.org/D_for_Win32 .
Mar 07 2014
On Friday, 7 March 2014 at 20:14:07 UTC, Carl Sturtivant wrote:I'm using DMD32 D Compiler v2.064 on windowsThis is the main problem. All recent work Martin Nowak has done on improving dynamic loading is Linux-only for now. Windows support is very limited compared to it.
Mar 07 2014