--- 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;