title: How to catch the Control-C exception in a Visual C++ console app?
body: <p>This seems like it ought to be simple, but I've tried both<br>
  <code>try {} catch (...) {}</code>   C++ exception handling and<br>
  <code>__try {} __finally {}</code>   structured exception handling (SEH)<br>
  and neither one will catch the exception that happens when you Control-C the application.</p>
  
  <p>I didn't really expect C++ exception handling to do this, since the Control-C is a system-type signal and not caused by a C++ throw(), but I tried it anyway when SEH didn't work.</p>
  
  <p>If I run under a debugger, it shows that Control-C raises a first-chance exception, but when it's rethrown, my handler is never invoked.</p>