D
Dave Hall
How can I catch a Native Exception in CE 4.1 w/ Compact Framework? It's
blowing my whole app out of the water. Even when I run it under the VS
debugger, it doesn't get caught by the debugger. It's happening just after a
background ThreadStart function terminates (that is, after the background
thread terminates), so I'm not sure where I can put a try block to catch it.
I don't think that putting it in main() would help because that's a
different thread, although I guess it wouldn't hurt to give it a try.
Besides not knowing where to put a try block, I'm not even sure if a Native
Exception is derived from the base Exception class and can be caught with a
standard try/catch construct, or if it has to be handled differently.
Everything in the problem thread is managed code written in C#. I'm pretty
sure there are no P/Invoke calls in the thread that's causing the trouble.
(I'll check and be sure tomorrow).
Any suggestions?
Thanks in advance,
Dave
blowing my whole app out of the water. Even when I run it under the VS
debugger, it doesn't get caught by the debugger. It's happening just after a
background ThreadStart function terminates (that is, after the background
thread terminates), so I'm not sure where I can put a try block to catch it.
I don't think that putting it in main() would help because that's a
different thread, although I guess it wouldn't hurt to give it a try.
Besides not knowing where to put a try block, I'm not even sure if a Native
Exception is derived from the base Exception class and can be caught with a
standard try/catch construct, or if it has to be handled differently.
Everything in the problem thread is managed code written in C#. I'm pretty
sure there are no P/Invoke calls in the thread that's causing the trouble.
(I'll check and be sure tomorrow).
Any suggestions?
Thanks in advance,
Dave