浏览代码

fix wording of error message when field not found during reading of lfm file

Bernd Kreuss 3 年之前
父节点
当前提交
2210143239
共有 2 个文件被更改,包括 2 次插入1 次删除
  1. 1 1
      rtl/objpas/classes/reader.inc
  2. 1 0
      rtl/objpas/rtlconst.inc

+ 1 - 1
rtl/objpas/classes/reader.inc

@@ -1784,7 +1784,7 @@ begin
     OnFindComponentClass(Self, AClassName, Result);
 
   if (Result=nil) or (not Result.InheritsFrom(TComponent)) then
-    raise EClassNotFound.CreateFmt(SClassNotFound, [AClassName]);
+    raise EClassNotFound.CreateFmt(SNoFieldOfClassIn, [AClassName, Root.ClassName]);
 end;
 
 

+ 1 - 0
rtl/objpas/rtlconst.inc

@@ -203,6 +203,7 @@ ResourceString
   SNoCanvasHandle               = 'Canvas handle does not allow drawing';
   SNoComSupport                 = '"%s" has not been registered as a COM class';
   SNoDefaultPrinter             = 'No default printer was selected';
+  SNoFieldOfClassIn             = 'No field of class "%s" in "%s"';
   SNoMDIForm                    = 'No MDI form is available, none is active';
   SNoTimers                     = 'No timers available';
   SNotOpenErr                   = 'No MCI-device opened';