# HG changeset patch # User sheepluva # Date 1506720689 -7200 # Node ID 95f0e475ca8ea94173c0958ff0c0febc86ac075e # Parent 9805a1f8fb93a18f9ddc410deddeeee9194504ce change return codes to avoid overlap with fpc ones diff -r 9805a1f8fb93 -r 95f0e475ca8e hedgewars/uConsts.pas --- 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;