mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-14 23:39:23 +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,
|
cthreads,
|
||||||
{$ENDIF}{$ENDIF}
|
{$ENDIF}{$ENDIF}
|
||||||
Interfaces, // this includes the LCL widgetset
|
Interfaces, // this includes the LCL widgetset
|
||||||
Forms, Unit1, SimpleFrm, anchordockpkg
|
Forms, Unit1, SimpleFrm, AnchorDocking, anchordockpkg
|
||||||
{ you can add units after this };
|
{ you can add units after this };
|
||||||
|
|
||||||
{$R *.res}
|
{$R *.res}
|
||||||
@ -15,7 +15,7 @@ uses
|
|||||||
begin
|
begin
|
||||||
Application.Initialize;
|
Application.Initialize;
|
||||||
Application.CreateForm(TMainIDE, MainIDE);
|
Application.CreateForm(TMainIDE, MainIDE);
|
||||||
Application.CreateForm(TSimpleForm, SimpleForm);
|
DockMaster.MakeDockable(MainIDE);
|
||||||
Application.Run;
|
Application.Run;
|
||||||
end.
|
end.
|
||||||
|
|
||||||
|
@ -734,6 +734,8 @@ var i, j, FilenameEndPos: integer;
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
function CheckForUrgentMessages(p: integer): boolean;
|
function CheckForUrgentMessages(p: integer): boolean;
|
||||||
|
const
|
||||||
|
UnableToOpen = 'Fatal: Unable to open file ';
|
||||||
var
|
var
|
||||||
NewLine: String;
|
NewLine: String;
|
||||||
LastFile: string;
|
LastFile: string;
|
||||||
@ -770,7 +772,10 @@ var i, j, FilenameEndPos: integer;
|
|||||||
if fLastErrorType in [etPanic,etFatal] then begin
|
if fLastErrorType in [etPanic,etFatal] then begin
|
||||||
// fatal and panic errors are not very informative
|
// fatal and panic errors are not very informative
|
||||||
// -> prepend current file
|
// -> 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];
|
LastFile:=fCompilingHistory[fCompilingHistory.Count-1];
|
||||||
if not FilenameIsAbsolute(LastFile) then
|
if not FilenameIsAbsolute(LastFile) then
|
||||||
FullFilename:=TrimFilename(fCurrentDirectory+LastFile)
|
FullFilename:=TrimFilename(fCurrentDirectory+LastFile)
|
||||||
|
Loading…
Reference in New Issue
Block a user