Selaa lähdekoodia

SysInfo some changes

Unknown 5 vuotta sitten
vanhempi
commit
fec7b561c7
1 muutettua tiedostoa jossa 10 lisäystä ja 1 poistoa
  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.