# Exit Code Mappings For particular runtime environments ReCodEx can provide mappings of result codes to some custom messages. This is possible for example for Java, C# or Python where there can be custom wrappers/runners which might catch exceptions and then provide users more detailed information about evaluations. ## Free Pascal Actually, the FPC itself returns a specific code when a runtime error is encountered. All exit codes on the runtime errors list are translated into corresponding strings according to FPC documentation: [https://www.freepascal.org/docs-html/user/userap4.html](https://www.freepascal.org/docs-html/user/userap4.html) ## Java Runner: https://github.com/ReCodEx/utils/blob/master/runners/java/javarun.java | Exit Code | Exception | Mapping | | --------- | --------- | ------- | | 0 | --- | OK | | 1 | Throwable | Unknown error | | 2 | InvocationTargetException | Other invocation target exception | | 100 | OutOfMemoryError | Out of memory exception | | 101 | SecurityException | Security exception | | 102 | --- | Main class not found exception | | 104 | IllegalAccessException | Illegal access exception | | 105 | IllegalArgumentException | Illegal argument exception | | 106 | StackOverflowError | Stack overflow exception | | 107 | ArrayIndexOutOfBoundsException | Array index out of bounds exception | | 108 | IndexOutOfBoundsException | Index out of bounds exception | | 109 | NullPointerException | Null pointer exception | | 110 | ArithmeticException | Arithmetic exception | | 111 | OutOfMemoryError | Out of memory error | | 112 | SecurityException | Security exception | | 113 | IOException | IO exception | ## C# Runner: https://github.com/ReCodEx/utils/blob/master/runners/cs/Wrapper.cs | Exit Code | Exception | Mapping | | --------- | --------- | ------- | | 0 | --- | OK | | 1 | --- | User error | | 101 | TargetInvocationException | Unhandled exception | | 102 | NullReferenceException | Null reference error | | 103 | OutOfMemoryException | Memory allocation error | | 104 | IndexOutOfRangeException | Index out of range error | | 105 | OverflowException | Overflow error | | 106 | IOException | IO error | | 107 | FileNotFoundException | File not found error | | 108 | InvalidOperationException | Invalid operation error | | 109 | DivideByZeroException | Division by zero error | | 200 | Exception | Internal error | | 201 | --- | No main method | | 202 | --- | More main methods | ## Python3 Runner: https://github.com/ReCodEx/utils/blob/master/runners/py/runner.py | Exit Code | Exception | Mapping | | --------- | --------- | ------- | | 0 | --- | OK | | 1 | BaseException | ??? | | 101 | AssertionError | ??? | | 102 | TypeError | ??? | | 103 | NameError | ??? | | 104 | EOFError | ??? | | 105 | AttributeError | ??? | | 106 | IOError | ??? | | 107 | OSError | ??? | | 108 | LookupError | ??? | | 109 | ValueError | ??? | | 110 | ZeroDivisionError | ??? | | 111 | ArithmeticError | ??? | | 112 | ImportError | ??? | | 113 | MemoryError | ??? | | 114 | SyntaxError | ??? |