diff --git a/components/codetools/codetoolmanager.pas b/components/codetools/codetoolmanager.pas index 28fb71d2ca..cf250a015b 100644 --- a/components/codetools/codetoolmanager.pas +++ b/components/codetools/codetoolmanager.pas @@ -1787,8 +1787,8 @@ var DirtyPos: Integer; ErrorDirTool: TCompilerDirectivesTree; begin - fErrorMsg:=AnException.Message; ClearError; + fErrorMsg:=AnException.Message; if (AnException is ELinkScannerError) then begin // link scanner error if AnException is ELinkScannerConsistency then