$ cat ex.cpp
#include <stdexcept>
int main() {
 try {
  throw new std::exception();
 } catch (const std::exception& ex) {
  return 1;
 }
 return 0;
}

You are throwing a pointer and trying to catch a reference, so the exception never gets caught at all, which causes the program to abort. You should should do

        throw std::exception();

instead.

-Lewis


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

Reply via email to