Exception on Cygwin64/windows 8

H

hbdevelop1

Hello all,

I am using Cygwin64 under windows 8, and gcc-g++ ver. 4.8.1-3

I get the following crash with the code below:
$ ./a
inside try block
Segmentation fault (core dumped)


int main()
{
try
{
cout<<"inside try block\n";
throw "A failure!";
}
catch( char * str )
{
cout<<"inside catch block\n";
cout << "hException raised: " << str << '\n';
}
cout<<"outside everything\n";
return 0;
}


Does anybody have a clue why the exception do not work properly ?

Thank you in advance
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,072
Latest member
trafficcone

Latest Threads

Top