mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-12 20:29:23 +02:00
* better exception catching
This commit is contained in:
parent
83ac6eeaad
commit
d1e6934a5b
@ -407,12 +407,28 @@ begin
|
|||||||
|
|
||||||
on EControlCAbort do
|
on EControlCAbort do
|
||||||
begin
|
begin
|
||||||
Message(general_e_compilation_aborted);
|
try
|
||||||
|
{ in case of 50 errors, this could cause another exception,
|
||||||
|
suppress this exception
|
||||||
|
}
|
||||||
|
Message(general_e_compilation_aborted);
|
||||||
|
except
|
||||||
|
on ECompilerAbort do
|
||||||
|
;
|
||||||
|
end;
|
||||||
DoneVerbose;
|
DoneVerbose;
|
||||||
end;
|
end;
|
||||||
on ECompilerAbort do
|
on ECompilerAbort do
|
||||||
begin
|
begin
|
||||||
Message(general_e_compilation_aborted);
|
try
|
||||||
|
{ in case of 50 errors, this could cause another exception,
|
||||||
|
suppress this exception
|
||||||
|
}
|
||||||
|
Message(general_e_compilation_aborted);
|
||||||
|
except
|
||||||
|
on ECompilerAbort do
|
||||||
|
;
|
||||||
|
end;
|
||||||
DoneVerbose;
|
DoneVerbose;
|
||||||
end;
|
end;
|
||||||
on ECompilerAbortSilent do
|
on ECompilerAbortSilent do
|
||||||
@ -422,7 +438,15 @@ begin
|
|||||||
on Exception do
|
on Exception do
|
||||||
begin
|
begin
|
||||||
{ General catchall, normally not used }
|
{ General catchall, normally not used }
|
||||||
Message(general_e_compilation_aborted);
|
try
|
||||||
|
{ in case of 50 errors, this could cause another exception,
|
||||||
|
suppress this exception
|
||||||
|
}
|
||||||
|
Message(general_e_compilation_aborted);
|
||||||
|
except
|
||||||
|
on ECompilerAbort do
|
||||||
|
;
|
||||||
|
end;
|
||||||
DoneVerbose;
|
DoneVerbose;
|
||||||
Raise;
|
Raise;
|
||||||
end;
|
end;
|
||||||
@ -446,7 +470,10 @@ end;
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.60 2005-04-24 21:01:37 peter
|
Revision 1.61 2005-05-06 18:54:26 florian
|
||||||
|
* better exception catching
|
||||||
|
|
||||||
|
Revision 1.60 2005/04/24 21:01:37 peter
|
||||||
* always use exceptions to stop the compiler
|
* always use exceptions to stop the compiler
|
||||||
- remove stop, do_stop
|
- remove stop, do_stop
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user