Topic: Help: throw, catch
Author: b91926@fsgm01.fnal.gov (David Sachs)
Date: 20 Jan 1995 18:04:29 -0600 Raw View
wenp@bert.eecs.uic.edu (Wenpeng Xu) writes:
>hi,
> I am reading the book " C++ hoe to program" about throw and catch,
>here is a example, when I compile it using g++, the error message is:
>crack.c: In function `float quotient(int, int)':
>crack.c:16: warning: `catch', `throw', and `try' are all C++ reserved words
>crack.c:16: warning: implicit declaration of function `int DivedeByZeroError(...)'
>crack.c:16: exception handling disabled, use -fhandle-exceptions to enable.
...
Look at the last error message pertaining to line 16. Have you tried
recompiling your program with the -fhandle-exceptions compiler
option?
I suspect that the compiler version you are using will not allow
exception processing unless you specify that option.