This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Problems with exceptions in B19


Hi,

I can't get any of my code that uses exceptions to work under B19. Here
is an example:

#include <stdio.h>

class EError {
public:
  int dummy;
  EError(int a ) { dummy = a; };
};

int main( int argc, char *argv[]) {

  try {
    throw EError(argc); 
    printf("No exception\n");
  }
  catch (EError e) {
    printf("Caught exception %d\n", e.dummy);
  }


}

When I compile this with:

g++ -fexceptions test.cc

and run it the program stops with the message `aborted'. Any idea what's
up? This code works fine with gcc 2.7.2 on linux.


Thanks,

Chris Waters.
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]