I got a rather strange little problem.
In the following code, I cannot figure out how e can be null ;
try { //Some Code here } catch (Exception e) { //Here e is null }
As far as I know, throw null will be converted to throw new NullReferenceException() .
The problem seems to be related to the multi-threaded process, since deleting another thread also seems to fix it. Or at least I saw it only when the above code runs in a new thread. The whole program uses a lot of threads and is a bit complicated.
Anyway, my question is: how can e be null? βI hope the answer to this helps find the source of this problem.β
Edit I found this because it threw a NullReferenceException in the catch statement, and with the debugger I can see the same thing.
Edit 2 Having opened VisualStudio the next day, I tried again, the code has not changed, and now the same catch phrase is βcalledβ, but this time e is not null. It seems to have been a VS crash.
Jacob Poul Richardt Dec 03 '09 at 17:22 2009-12-03 17:22
source share