瀏覽代碼

* Emit better error when not able to load auto units

Michaël Van Canneyt 1 年之前
父節點
當前提交
a04d2b59f6
共有 1 個文件被更改,包括 5 次插入1 次删除
  1. 5 1
      compiler/pmodules.pas

+ 5 - 1
compiler/pmodules.pas

@@ -200,8 +200,10 @@ implementation
         if not load_ok then
           { We must schedule a compile. }
           task_handler.addmodule(hp);
+
         { add to symtable stack }
-        symtablestack.push(hp.globalsymtable);
+        if assigned(hp.globalsymtable) then
+          symtablestack.push(hp.globalsymtable);
         if (m_mac in current_settings.modeswitches) and
             assigned(hp.globalmacrosymtable) then
            macrosymtablestack.push(hp.globalmacrosymtable);
@@ -383,6 +385,8 @@ implementation
         begin
           m:=AddUnit(curr,s,true);
           OK:=assigned(m) and (m.state in [ms_processed,ms_compiled]);
+          if not ok then
+            Message2(unit_f_cant_find_ppu,s,curr.realmodulename^);
           Result:=ok and Result;
         end;