Add EngineErrorCodes
authorWuzzy <almikes@aol.com>
Sun, 15 Jul 2018 17:01:59 +0200
changeset 1465 5cad5459ba1b
parent 1458 729a59e18c7d
child 1466 c7d413fe2db3
Add EngineErrorCodes
EngineErrorCodes.wiki
TableOfContents.wiki
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/EngineErrorCodes.wiki	Sun Jul 15 17:01:59 2018 +0200
@@ -0,0 +1,25 @@
+#summary List of engine error codes
+When the engine crashes or is closed, it returns an exit code (or error code) which can be used to further analyze the problem.
+
+= List of engine error codes =
+This is the list of all possible error codes:
+
+|| Exit code || Meaning || Description || Solution ||
+|| 0 || No error || Engine exited normally || N/A ||
+|| 51 || Usage error || The engine was launched with invalid command line arguments || Check your command-line arguments. Use `hwengine --help` for a list ||
+|| 52 || Fatal error || Generic error for critical errors. Commonly happens when a critical file like an image was not found || Check the error message or the end of `Logs/game0.log` in your [http://hedgewars.org/wiki/User_directory user directory] for clues ||
+|| 53 || Startup error || Failure while initializing stuff on startup, like graphics, shader, OpenGL stuff, etc. || Check your [Dependencies] and if you have the latest drivers installed and update them as needed ||
+|| 54 || Fatal error, no IPC socket || Similar to error 52, but the IPC socket is not working for some reason || Check the end of `Logs/game0.log` in your [http://hedgewars.org/wiki/User_directory user directory] for clues ||
+|| Other || Free Pascal run-time error. This is probably a bug || See [https://www.freepascal.org/docs-html/user/userap4.html Free Pascal run-time errors] || [http://www.hedgewars.org/bugs Report a bug], then someone should fix it ||
+
+= Error codes when performing engine test cases =
+When the engine is used to perform [EngineTestCases test cases], the follwing additional codes are used:
+
+|| Exit code || Meaning || Solution ||
+|| 0 || Test succeeded || N/A ||
+|| 60 || Test failed || Fix the engine ||
+|| 61 || Lua error in test case || Fix the Lua code of the test case ||
+|| 62 || Unexpected error while testing || Debug ||
+
+= Source code =
+The exit codes are defined in `[https://hg.hedgewars.org/hedgewars/file/tip/hedgewars/uConsts.pas hedgewars/uConsts.pas]`.
--- a/TableOfContents.wiki	Fri Jul 13 05:07:20 2018 +0100
+++ b/TableOfContents.wiki	Sun Jul 15 17:01:59 2018 +0200
@@ -42,10 +42,11 @@
    * Overview
     * [TODO To-do list]
    * Documentation
+    * [EngineProtocol Engine protocol]
+    * [EngineTestCases Engine test cases]
+    * [EngineErrorCodes Engine error codes]
     * [PascalSyntax Pascal syntax rules]
-    * [EngineProtocol Engine protocol]
     * [Hedgeroid_explained Hedgeroid, the Android port]
-    * [EngineTestCases Engine test cases]
    * Guides
     * [Releasing Releasing Hedgewars]
     * [ContributingCode How to contribute code]