mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-29 20:20:16 +02:00
no message
This commit is contained in:
parent
2729f303a4
commit
97bbacd0a8
@ -5,5 +5,18 @@ uses
|
|||||||
resourcestring sMyNewErrorMessage = 'Illegal value: %d';
|
resourcestring sMyNewErrorMessage = 'Illegal value: %d';
|
||||||
|
|
||||||
begin
|
begin
|
||||||
|
try
|
||||||
raise Exception.CreateResFmt(@sMyNewErrorMessage, [-1]);
|
raise Exception.CreateResFmt(@sMyNewErrorMessage, [-1]);
|
||||||
|
except
|
||||||
|
on e : exception do
|
||||||
|
begin
|
||||||
|
if e.message='Illegal value: -1' then
|
||||||
|
halt(0)
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
writeln('error : ',e.message);
|
||||||
|
halt(1);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
end.
|
end.
|
||||||
|
Loading…
Reference in New Issue
Block a user