mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-23 23:29:11 +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;
|
||||
|
||||
function TCodeToolManager.HandleException(AnException: Exception): boolean;
|
||||
var ErrorSrcTool: TCustomCodeTool;
|
||||
var
|
||||
ErrorSrcTool: TCustomCodeTool;
|
||||
DirtyPos: Integer;
|
||||
ErrorDirTool: TCompilerDirectivesTree;
|
||||
begin
|
||||
fErrorMsg:=AnException.Message;
|
||||
fErrorTopLine:=0;
|
||||
fErrorCode:=nil;
|
||||
fErrorColumn:=-1;
|
||||
fErrorLine:=-1;
|
||||
if (AnException is ELinkScannerError) then begin
|
||||
// link scanner error
|
||||
if AnException is ELinkScannerConsistency then
|
||||
@ -1761,14 +1765,10 @@ begin
|
||||
// Compiler directive parser error
|
||||
ErrorDirTool:=ECDirectiveParserException(AnException).Sender;
|
||||
fErrorCode:=ErrorDirTool.Code;
|
||||
fErrorColumn:=-1;
|
||||
fErrorLine:=-1;
|
||||
end else if (AnException is ESourceChangeCacheError) then begin
|
||||
// SourceChangeCache error
|
||||
fErrorCode:=nil;
|
||||
end else if (AnException is ECodeToolManagerError) then begin
|
||||
// CodeToolManager error
|
||||
fErrorCode:=nil;
|
||||
end else begin
|
||||
// unknown exception
|
||||
DumpExceptionBackTrace;
|
||||
|
Loading…
Reference in New Issue
Block a user