title: Why is my UnhandledExceptionFilter not being called on a simple divide by zero?
body: <p>I am using the following MSVC++ console application code (running on Windows 8.1, Release, Win32) to try and return a top-level exception back to me:</p>
  
  <pre><code>#include "stdafx.h"
  #include &lt;Windows.h&gt;
  #include &lt;iostream&gt;
  
  using namespace std; 
  
  LONG WINAPI UnhandledExceptionFilter(PEXCEPTION_POINTERS exception)
  {
      printf("Got an unhandled exception.");
      return EXCEPTION_CONTINUE_SEARCH;
  }
  
  int _tmain(int argc, _TCHAR* argv[])
  {
      SetUnhandledExceptionFilter(UnhandledExceptionFilter);
      int a = 0;
      int b = 0;
      int c = a / b;
      cin.get();
      return 0;
  }
  </code></pre>
  
  <p>My <code>UnhandledExceptionFilter</code> doesn't actually seem to ever get called on the divide by zero exception that is being thrown in this example, otherwise I would expect the "Got an unhandled exception" log message to show up. Why is that?</p>