mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-13 04:09:33 +02:00
* Exception on file not found
This commit is contained in:
parent
c41610d6b7
commit
d1070b6c6b
@ -164,7 +164,8 @@ type
|
||||
function FindIncludeFile(const AName: String): TLineReader;
|
||||
end;
|
||||
|
||||
EScannerError = class(Exception);
|
||||
EScannerError = class(Exception);
|
||||
EFileNotFoundError = class(Exception);
|
||||
|
||||
TPascalScannerPPSkipMode = (ppSkipNone, ppSkipIfBranch, ppSkipElseBranch,
|
||||
ppSkipAll);
|
||||
@ -379,7 +380,7 @@ end;
|
||||
function TFileResolver.FindSourceFile(const AName: String): TLineReader;
|
||||
begin
|
||||
if not FileExists(AName) then
|
||||
Result := nil
|
||||
Raise EFileNotFoundError.create(Aname)
|
||||
else
|
||||
try
|
||||
Result := TFileLineReader.Create(AName);
|
||||
@ -1026,7 +1027,10 @@ end.
|
||||
|
||||
{
|
||||
$Log$
|
||||
Revision 1.5 2003-10-25 16:24:29 michael
|
||||
Revision 1.6 2004-05-01 20:08:51 marco
|
||||
* Exception on file not found
|
||||
|
||||
Revision 1.5 2003/10/25 16:24:29 michael
|
||||
+ FPC also accepts binary numbers starting with %
|
||||
|
||||
Revision 1.4 2003/09/02 13:26:06 mattias
|
||||
|
Loading…
Reference in New Issue
Block a user