Mail Archives: djgpp/1998/12/19/03:44:52
To : <djgpp AT delorie DOT com>
From: Serge Slepov <sergeslepov AT hotmail DOT com>
Subj: does djgpp support exceptions?
hi there,
my question is: does djgpp support exceptions? (you know, try{}
catch{}... )
I tried to run a simple example program but it seems not to catch the
exception at all, it only says `Abort!' and stops.
can someone help?
(please mail me directly, not via the mailing list. thx. )
Serge
the code goes below.....
#include <stdio.h>
int main( int argc, char *argv[] )
{
try
{
if( argc == 1 )
throw "Insufficient no. of arguments. ";
printf("No exception generated.\n");
return 0;
}
catch( const char * msg )
{
printf("%s\n", msg );
fflush(stdout);
}
printf("continue here after exception.\n" );
return 1;
}
______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com
- Raw text -