|
@@ -135,6 +135,18 @@ begin
|
|
end;
|
|
end;
|
|
end;
|
|
end;
|
|
test_exception('ln(0)');
|
|
test_exception('ln(0)');
|
|
|
|
+ try
|
|
|
|
+ exception_called:=false;
|
|
|
|
+ i := -1;
|
|
|
|
+ e := sqrt(i);
|
|
|
|
+ except
|
|
|
|
+ on e : exception do
|
|
|
|
+ begin
|
|
|
|
+ Writeln('exception called ',e.message);
|
|
|
|
+ exception_called:=true;
|
|
|
|
+ end;
|
|
|
|
+ end;
|
|
|
|
+ test_exception('sqrt(-1)');
|
|
if program_has_errors then
|
|
if program_has_errors then
|
|
Halt(1);
|
|
Halt(1);
|
|
end.
|
|
end.
|