mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-27 05:40:24 +02:00
IDE: handle fpc message Fatal: Unable to open file, bug #16687
git-svn-id: trunk@26008 -
This commit is contained in:
parent
450e7aa727
commit
37a7255199
@ -7,7 +7,7 @@ uses
|
||||
cthreads,
|
||||
{$ENDIF}{$ENDIF}
|
||||
Interfaces, // this includes the LCL widgetset
|
||||
Forms, Unit1, SimpleFrm, anchordockpkg
|
||||
Forms, Unit1, SimpleFrm, AnchorDocking, anchordockpkg
|
||||
{ you can add units after this };
|
||||
|
||||
{$R *.res}
|
||||
@ -15,7 +15,7 @@ uses
|
||||
begin
|
||||
Application.Initialize;
|
||||
Application.CreateForm(TMainIDE, MainIDE);
|
||||
Application.CreateForm(TSimpleForm, SimpleForm);
|
||||
DockMaster.MakeDockable(MainIDE);
|
||||
Application.Run;
|
||||
end.
|
||||
|
||||
|
@ -734,6 +734,8 @@ var i, j, FilenameEndPos: integer;
|
||||
end;
|
||||
|
||||
function CheckForUrgentMessages(p: integer): boolean;
|
||||
const
|
||||
UnableToOpen = 'Fatal: Unable to open file ';
|
||||
var
|
||||
NewLine: String;
|
||||
LastFile: string;
|
||||
@ -770,7 +772,10 @@ var i, j, FilenameEndPos: integer;
|
||||
if fLastErrorType in [etPanic,etFatal] then begin
|
||||
// fatal and panic errors are not very informative
|
||||
// -> prepend current file
|
||||
if (fCompilingHistory<>nil) and (fCompilingHistory.Count>0) then begin
|
||||
if CompStr(UnableToOpen, NewLine, 1) then
|
||||
CurrentMessageParts.Values['Filename']:=
|
||||
TrimFilename(SetDirSeparators(Copy(NewLine,Length(UnableToOpen)+1,Length(NewLine))))
|
||||
else if (fCompilingHistory<>nil) and (fCompilingHistory.Count>0) then begin
|
||||
LastFile:=fCompilingHistory[fCompilingHistory.Count-1];
|
||||
if not FilenameIsAbsolute(LastFile) then
|
||||
FullFilename:=TrimFilename(fCurrentDirectory+LastFile)
|
||||
|
Loading…
Reference in New Issue
Block a user