From a10480232695916df89f7d8970ea053f7036e48b Mon Sep 17 00:00:00 2001
From: iamashwin99 <ashwin-kumar.karnad@mpsd.mpg.de>
Date: Wed, 28 Jun 2023 14:49:03 +0200
Subject: [PATCH] add a table of exit codes

---
 development.rst | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/development.rst b/development.rst
index 4d029e4..f034c98 100644
--- a/development.rst
+++ b/development.rst
@@ -17,3 +17,20 @@ Then every time you commit, pre-commit will run all checks defined in `.pre-comm
 you can run the pre-commit checks manually by running::
 
     pre-commit run --all-files
+
+Debugging exit codes
+--------------------
+Non zero exit codes are used to indicate that the program exited due to an error.
+There are multiple ways to debug this. You could run the program with more verbose logging::
+
+    mpsd-software -l debug ...
+
+Here is a list of exit codes and what they mean:
++-----------+------------------------------------------+----------------------------------------------------------------------------------+
+| Exit code | Reason                                   | Solution                                                                         |
++===========+==========================================+==================================================================================+
+| 10        | Call of 'archspec cpu' failed            | Please install archspec, for example via 'pipx install archspec'                 |
+| 20        | Requested package set is not available   | Use 'available' command to see list of available package_sets                    |
+| 30        | Current directory is already initialised | Check if you are in the  right directory                                         |
+| 40        | Current directory is not initialised     | Check if you are in the  right directory, if so use 'init' command to initialise |
++-----------+------------------------------------------+----------------------------------------------------------------------------------+
-- 
GitLab