Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. .NET (Core and Framework)
  4. Why would an exception that's been caught continue to propogate up the call stack?

Why would an exception that's been caught continue to propogate up the call stack?

Scheduled Pinned Locked Moved .NET (Core and Framework)
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • G Offline
    G Offline
    gmarian
    wrote on last edited by
    #1

    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?

    C 1 Reply Last reply
    0
    • G gmarian

      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?

      C Offline
      C Offline
      Colin Angus Mackay
      wrote on last edited by
      #2

      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

      G 1 Reply Last reply
      0
      • C Colin Angus Mackay

        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

        G Offline
        G Offline
        gmarian
        wrote on last edited by
        #3

        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.

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups