This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

exceptions in C++


Hi,

is it possible to protected code fragments for situations like
division by zero errors or segmentation faults in the means of
exceptions?

E.g.

...
try {
  int a = 1 / 0;
} catch (DivdeByZeroException e) {
   ...
}

Jepp , i know, the DivideByZeroException does not exists. The question
is, is it possible to turn the error situation in an exceptional. As an
example by providing a signal handler which is capable to raise
exceptions.

Any comments or suggestions would be nice.

cu
Matthias Oltmanns

-- 
Matthias Oltmanns

Tel: 04421-1543-274
mail: Mathias dot Oltmanns dot Oltmanns at sysde dot eads dot net


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