From 96730e8eff0502d1b5e438fbc6b325a99325b508 Mon Sep 17 00:00:00 2001 From: Martin Polanka Date: Mon, 16 Oct 2017 19:10:15 +0200 Subject: [PATCH] mappings --- Exit-Code-Mappings.md | 48 ++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 47 insertions(+), 1 deletion(-) diff --git a/Exit-Code-Mappings.md b/Exit-Code-Mappings.md index cb21e74..6f20841 100644 --- a/Exit-Code-Mappings.md +++ b/Exit-Code-Mappings.md @@ -1 +1,47 @@ -# Exit Code Mappings \ No newline at end of file +# 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 or C# where there can be custom wrappers/runners which might catch exceptions and then provide users more detailed information about evaluations. + +## 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 |