hedgewars/uConsts.pas
changeset 12604 95f0e475ca8e
parent 12598 d6bd8b327a09
child 12654 2837dee472cc
--- a/hedgewars/uConsts.pas	Fri Sep 29 23:29:00 2017 +0200
+++ b/hedgewars/uConsts.pas	Fri Sep 29 23:31:29 2017 +0200
@@ -27,17 +27,22 @@
 
 const
     HDPIScaleFactor     =  1;
+
+    // application return codes
     HaltNoError         =  0;
-    HaltUsageError      =  1;
-    HaltFatalError      =  2;
-    HaltStartupError    =  3;
-    HaltFatalErrorNoIPC =  4;
+
+    // error codes are placed in range 50-99 because that way then don't overlap with run-time errors of pascal
+    // see https://www.freepascal.org/docs-html/user/userap4.html
+    HaltUsageError      =  51;
+    HaltFatalError      =  52;
+    HaltStartupError    =  53;
+    HaltFatalErrorNoIPC =  54;
 
     // for automatic tests
     HaltTestSuccess     =  0;
-    HaltTestFailed      =  10;
-    HaltTestLuaError    =  11;
-    HaltTestUnexpected  =  12;
+    HaltTestFailed      =  60;
+    HaltTestLuaError    =  61;
+    HaltTestUnexpected  =  62;
 
 
     sfMax = 1000;