mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-14 11:09:41 +02:00
Also accept EMathError exception
This commit is contained in:
parent
cbd4e681d0
commit
3707000121
@ -14,11 +14,19 @@ begin
|
||||
writeln(power(a,b));
|
||||
except
|
||||
on e: EZeroDivide do begin
|
||||
writeln('EZeroDivide Exception: ',e.Message);
|
||||
writeln(Infinity);
|
||||
end;
|
||||
on e: EMathError do begin
|
||||
writeln('MathError Exception: ',e.Message);
|
||||
writeln(Infinity);
|
||||
end;
|
||||
end;
|
||||
except
|
||||
halt(1);
|
||||
on e:Exception do begin
|
||||
writeln('Error: exception at wrong level: ',e.Message);
|
||||
halt(1);
|
||||
end;
|
||||
end;
|
||||
writeln('ok');
|
||||
end.
|
||||
|
Loading…
Reference in New Issue
Block a user