SIGFPE -> ArithmeticException ?

Andrew Haley aph@pasanda.cygnus.co.uk
Thu Jun 24 06:11:00 GMT 1999


> Date: 1999年6月24日 17:48:32 +1200
> From: Bryce McKinlay <bryce@albatross.co.nz>
>> gcj doesn't seem to throw an ArithmeticException when a SIGFPE occurs
> (x86, glibc). Instead, it dies and prints "Aborted".

Unfortunately, I can't duplicate your problem. This *is* something we
regularly test.
Please run the program under gdb. When the SIGFPE occurs, put a
breakpoint on 'catch-fpe'. When you get to 'catch-fpe', print a
backtrace and mail it to me.
Thanks,
Andrew.
> Test code:
>> public class DivByZero
> {
> public static void main(String args[])
> {
> try
> {
> int a = 1000;
> int b = 0;
> int c = a/b;
> }
> catch (ArithmeticException x)
> {
> System.out.println("Good, we tried to divide by zero:");
> System.out.println(x);
> }
> }
> }
>> regards
>> [ bryce ]
>>


More information about the Java mailing list

AltStyle によって変換されたページ (->オリジナル) /