From f778e14f096fa3564141b8f5b36daf2e3a4f984a Mon Sep 17 00:00:00 2001 From: mattias Date: Tue, 9 Mar 2010 22:28:30 +0000 Subject: [PATCH] codetools: improved error message, when unit of include file is not known git-svn-id: trunk@23906 - --- components/codetools/codetoolmanager.pas | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/components/codetools/codetoolmanager.pas b/components/codetools/codetoolmanager.pas index 4fb924af88..beca538e52 100644 --- a/components/codetools/codetoolmanager.pas +++ b/components/codetools/codetoolmanager.pas @@ -1533,9 +1533,14 @@ begin ClearCurCodeTool; MainCode:=GetMainCode(Code); if MainCode=nil then begin - fErrorMsg:='TCodeToolManager.InitCurCodeTool MainCode=nil'; if Code = nil then - fErrorMsg := fErrorMsg + ' Code=nil'; + fErrorMsg:='TCodeToolManager.InitCurCodeTool Code=nil' + else begin + fErrorCode:=Code; + FErrorLine:=1; + FErrorColumn:=1; + fErrorMsg:='unit of include file is not known (hint: open and explore unit first)'; + end; exit; end; if MainCode.Scanner=nil then begin