CreateCompilerTestPascalFilename now catches exceptions

git-svn-id: trunk@9282 -
This commit is contained in:
mattias 2006-05-14 19:56:31 +00:00
parent 336c22deda
commit 4985171d4c
4 changed files with 35 additions and 8 deletions

View File

@ -102,14 +102,27 @@ end;
function CreateCompilerTestPascalFilename: string;
---------------------------------------------------------------------------}
function CreateCompilerTestPascalFilename: string;
var
fs: TFileStream;
function CreateFile(const Filename: string): boolean;
var
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
Result:=AppendPathDelim(GetPrimaryConfigPath)+'compilertest.pas';
if not FileExists(Result) then begin
fs:=TFileStream.Create(Result,fmCreate);
fs.Free;
end;
if CreateFile(Result) then exit;
Result:=AppendPathDelim(GetTempDir)+'compilertest1.pas';
if CreateFile(Result) then exit;
writeln('unable to create temporay file ',Result);
end;
{---------------------------------------------------------------------------

View File

@ -529,6 +529,15 @@ var i, j, FilenameEndPos: integer;
and (CompilerOptions.ShowAll or CompilerOptions.ShowExecInfo) then
DoAddFilteredLine(s);
end;
{ For example:
linkerror.o(.text$_main+0x9):linkerror.pas: undefined reference to `NonExistingFunction'
}
function CheckForLinkingErrors: boolean;
begin
Result:=false;
end;
begin
Result:=false;
@ -554,6 +563,9 @@ begin
// check for -vx output
Result:=CheckForExecutableInfo;
if Result then exit;
// check for linking errors
Result:=CheckForLinkingErrors;
if Result then exit;
// search for round bracket open
i:=1;

View File

@ -293,6 +293,8 @@ begin
end;
CommandLine:=CommandLine+' '+Params;
debugln('THTMLBrowserHelpViewer.ShowNode CommandLine=',CommandLine);
// run
try
BrowserProcess:=TProcess.Create(nil);

View File

@ -332,7 +332,7 @@ type
var ListOfNodes: THelpNodeQueryList;
var ErrMsg: string): TShowHelpResult; virtual;
function FindViewer(const MimeType: string; var ErrMsg: string;
var Viewer: THelpViewer): TShowHelpResult; virtual;
out Viewer: THelpViewer): TShowHelpResult; virtual;
public
// registration
procedure RegisterItem(NewItem: THelpDBItem);
@ -981,7 +981,7 @@ begin
end;
function THelpDatabase.FindViewer(const MimeType: string; var ErrMsg: string;
var Viewer: THelpViewer): TShowHelpResult;
out Viewer: THelpViewer): TShowHelpResult;
var
Viewers: TList;
begin