Browse Source

SysInfo some changes

Unknown 5 years ago
parent
commit
fec7b561c7
1 changed files with 10 additions and 1 deletions
  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.