mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-28 21:20:46 +02:00
codetools: init error state
git-svn-id: trunk@41005 -
This commit is contained in:
parent
16edde8af5
commit
09853b3d90
@ -1723,12 +1723,16 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
function TCodeToolManager.HandleException(AnException: Exception): boolean;
|
function TCodeToolManager.HandleException(AnException: Exception): boolean;
|
||||||
var ErrorSrcTool: TCustomCodeTool;
|
var
|
||||||
|
ErrorSrcTool: TCustomCodeTool;
|
||||||
DirtyPos: Integer;
|
DirtyPos: Integer;
|
||||||
ErrorDirTool: TCompilerDirectivesTree;
|
ErrorDirTool: TCompilerDirectivesTree;
|
||||||
begin
|
begin
|
||||||
fErrorMsg:=AnException.Message;
|
fErrorMsg:=AnException.Message;
|
||||||
fErrorTopLine:=0;
|
fErrorTopLine:=0;
|
||||||
|
fErrorCode:=nil;
|
||||||
|
fErrorColumn:=-1;
|
||||||
|
fErrorLine:=-1;
|
||||||
if (AnException is ELinkScannerError) then begin
|
if (AnException is ELinkScannerError) then begin
|
||||||
// link scanner error
|
// link scanner error
|
||||||
if AnException is ELinkScannerConsistency then
|
if AnException is ELinkScannerConsistency then
|
||||||
@ -1761,14 +1765,10 @@ begin
|
|||||||
// Compiler directive parser error
|
// Compiler directive parser error
|
||||||
ErrorDirTool:=ECDirectiveParserException(AnException).Sender;
|
ErrorDirTool:=ECDirectiveParserException(AnException).Sender;
|
||||||
fErrorCode:=ErrorDirTool.Code;
|
fErrorCode:=ErrorDirTool.Code;
|
||||||
fErrorColumn:=-1;
|
|
||||||
fErrorLine:=-1;
|
|
||||||
end else if (AnException is ESourceChangeCacheError) then begin
|
end else if (AnException is ESourceChangeCacheError) then begin
|
||||||
// SourceChangeCache error
|
// SourceChangeCache error
|
||||||
fErrorCode:=nil;
|
|
||||||
end else if (AnException is ECodeToolManagerError) then begin
|
end else if (AnException is ECodeToolManagerError) then begin
|
||||||
// CodeToolManager error
|
// CodeToolManager error
|
||||||
fErrorCode:=nil;
|
|
||||||
end else begin
|
end else begin
|
||||||
// unknown exception
|
// unknown exception
|
||||||
DumpExceptionBackTrace;
|
DumpExceptionBackTrace;
|
||||||
|
Loading…
Reference in New Issue
Block a user