Explorar el Código

SysInfo some changes

Unknown hace 5 años
padre
commit
fec7b561c7
Se han modificado 1 ficheros con 10 adiciones y 1 borrados
  1. 10 1
      Quick.SysInfo.pas

+ 10 - 1
Quick.SysInfo.pas

@@ -122,6 +122,15 @@ begin
 end;
 
 initialization
-  SystemInfo.GetInfo;
+  try
+    SystemInfo.GetInfo;
+  except
+    {$IFDEF MSWINDOWS}
+    on E : Exception do
+    begin
+      if (not IsLibrary) and (not IsService) then raise Exception.CreateFmt('Error getting SystemInfo: %s',[e.Message]);
+    end;
+    {$ENDIF}
+  end;
 
 end.