Why would an exception that's been caught continue to propogate up the call stack?
-
I'm writing a Windows Explorer-like clone for myself. I'm running into a problem where I still get an exception when I try to access empty drives (e.g. the floppy drive), despite having wrapped all the appropriate calls in try...catch blocks. The odd thing is that this doesn't happen when I build the project. However, if I try to run the executable directly, I get several exceptions. Same thing happens with a release version for the executable. Another odd thing is that sometimes I'll get 4 exceptions, all for drive A:. Other times, I'll get 2 exceptions, one for A: and one for an empty CD drive. Any ideas?
-
I'm writing a Windows Explorer-like clone for myself. I'm running into a problem where I still get an exception when I try to access empty drives (e.g. the floppy drive), despite having wrapped all the appropriate calls in try...catch blocks. The odd thing is that this doesn't happen when I build the project. However, if I try to run the executable directly, I get several exceptions. Same thing happens with a release version for the executable. Another odd thing is that sometimes I'll get 4 exceptions, all for drive A:. Other times, I'll get 2 exceptions, one for A: and one for an empty CD drive. Any ideas?
gmarian wrote:
Why would an exception that's been caught continue to propogate up the call stack?
One possibility: Because it's been rethrown.
Upcoming events: * Edinburgh: Web Security Conference Day for Windows Developers (12th April) * Glasgow: Introduction to AJAX (2nd May), SQL Server, Mock Objects My website
-
gmarian wrote:
Why would an exception that's been caught continue to propogate up the call stack?
One possibility: Because it's been rethrown.
Upcoming events: * Edinburgh: Web Security Conference Day for Windows Developers (12th April) * Glasgow: Introduction to AJAX (2nd May), SQL Server, Mock Objects My website
Edit: Your response got me thinking that I may be looking at this the wrong way. The window that pops-up is titled ".Net-BroacastEventWindow.1.0.3300.0.1: ExplorerPlus.exe - No Disk." When I remove the try block, this error pops up before .Net complains about the un-caught exception. So, I think I need to ask a different question. Thank you for the obvious answer, as it's made me rethink the problem.