mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-06-22 16:48:29 +02:00
CreateCompilerTestPascalFilename now catches exceptions
git-svn-id: trunk@9282 -
This commit is contained in:
parent
336c22deda
commit
4985171d4c
@ -102,14 +102,27 @@ end;
|
|||||||
function CreateCompilerTestPascalFilename: string;
|
function CreateCompilerTestPascalFilename: string;
|
||||||
---------------------------------------------------------------------------}
|
---------------------------------------------------------------------------}
|
||||||
function CreateCompilerTestPascalFilename: string;
|
function CreateCompilerTestPascalFilename: string;
|
||||||
var
|
|
||||||
|
function CreateFile(const Filename: string): boolean;
|
||||||
|
var
|
||||||
fs: TFileStream;
|
fs: TFileStream;
|
||||||
|
begin
|
||||||
|
if FileExists(Filename) then exit(true);
|
||||||
|
Result:=false;
|
||||||
|
try
|
||||||
|
fs:=TFileStream.Create(Filename,fmCreate);
|
||||||
|
fs.Free;
|
||||||
|
Result:=true;
|
||||||
|
except
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
Result:=AppendPathDelim(GetPrimaryConfigPath)+'compilertest.pas';
|
Result:=AppendPathDelim(GetPrimaryConfigPath)+'compilertest.pas';
|
||||||
if not FileExists(Result) then begin
|
if CreateFile(Result) then exit;
|
||||||
fs:=TFileStream.Create(Result,fmCreate);
|
Result:=AppendPathDelim(GetTempDir)+'compilertest1.pas';
|
||||||
fs.Free;
|
if CreateFile(Result) then exit;
|
||||||
end;
|
writeln('unable to create temporay file ',Result);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{---------------------------------------------------------------------------
|
{---------------------------------------------------------------------------
|
||||||
|
@ -530,6 +530,15 @@ var i, j, FilenameEndPos: integer;
|
|||||||
DoAddFilteredLine(s);
|
DoAddFilteredLine(s);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
{ For example:
|
||||||
|
linkerror.o(.text$_main+0x9):linkerror.pas: undefined reference to `NonExistingFunction'
|
||||||
|
}
|
||||||
|
function CheckForLinkingErrors: boolean;
|
||||||
|
begin
|
||||||
|
|
||||||
|
Result:=false;
|
||||||
|
end;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
Result:=false;
|
Result:=false;
|
||||||
if s='' then exit;
|
if s='' then exit;
|
||||||
@ -554,6 +563,9 @@ begin
|
|||||||
// check for -vx output
|
// check for -vx output
|
||||||
Result:=CheckForExecutableInfo;
|
Result:=CheckForExecutableInfo;
|
||||||
if Result then exit;
|
if Result then exit;
|
||||||
|
// check for linking errors
|
||||||
|
Result:=CheckForLinkingErrors;
|
||||||
|
if Result then exit;
|
||||||
|
|
||||||
// search for round bracket open
|
// search for round bracket open
|
||||||
i:=1;
|
i:=1;
|
||||||
|
@ -293,6 +293,8 @@ begin
|
|||||||
end;
|
end;
|
||||||
CommandLine:=CommandLine+' '+Params;
|
CommandLine:=CommandLine+' '+Params;
|
||||||
|
|
||||||
|
debugln('THTMLBrowserHelpViewer.ShowNode CommandLine=',CommandLine);
|
||||||
|
|
||||||
// run
|
// run
|
||||||
try
|
try
|
||||||
BrowserProcess:=TProcess.Create(nil);
|
BrowserProcess:=TProcess.Create(nil);
|
||||||
|
@ -332,7 +332,7 @@ type
|
|||||||
var ListOfNodes: THelpNodeQueryList;
|
var ListOfNodes: THelpNodeQueryList;
|
||||||
var ErrMsg: string): TShowHelpResult; virtual;
|
var ErrMsg: string): TShowHelpResult; virtual;
|
||||||
function FindViewer(const MimeType: string; var ErrMsg: string;
|
function FindViewer(const MimeType: string; var ErrMsg: string;
|
||||||
var Viewer: THelpViewer): TShowHelpResult; virtual;
|
out Viewer: THelpViewer): TShowHelpResult; virtual;
|
||||||
public
|
public
|
||||||
// registration
|
// registration
|
||||||
procedure RegisterItem(NewItem: THelpDBItem);
|
procedure RegisterItem(NewItem: THelpDBItem);
|
||||||
@ -981,7 +981,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
function THelpDatabase.FindViewer(const MimeType: string; var ErrMsg: string;
|
function THelpDatabase.FindViewer(const MimeType: string; var ErrMsg: string;
|
||||||
var Viewer: THelpViewer): TShowHelpResult;
|
out Viewer: THelpViewer): TShowHelpResult;
|
||||||
var
|
var
|
||||||
Viewers: TList;
|
Viewers: TList;
|
||||||
begin
|
begin
|
||||||
|
Loading…
Reference in New Issue
Block a user