Show user-friendly message on OOM compilation error

This should provide a hint to user how to mitigate out-of-memory error
on compilation inside Kotlin daemon or in-process.

^KT-47522 Fixed
This commit is contained in:
Yahor Berdnikau
2022-01-18 17:22:34 +01:00
parent ee180a37a6
commit 35ef8cc6da
6 changed files with 46 additions and 13 deletions
@@ -20,7 +20,9 @@ public enum ExitCode {
OK(0),
COMPILATION_ERROR(1),
INTERNAL_ERROR(2),
SCRIPT_EXECUTION_ERROR(3);
SCRIPT_EXECUTION_ERROR(3),
OOM_ERROR(137), // 137 is commonly used to indicate OOM error
;
private final int code;