Change error message of EXCEPTION_IN_CONST_VAL_INITIALIZER

This commit is contained in:
Ivan Kylchik
2022-02-04 12:29:09 +03:00
parent 001ecaa9b2
commit 40d224d5fe
10 changed files with 63 additions and 51 deletions
@@ -1,11 +1,5 @@
/exceptionFromInterpreter_ir.kt:7:26: error: An exception occur while evaluating const value initializer:
Exception java.lang.ArithmeticException: / by zero
at ExceptionFromInterpreter_irKt.<clinit>(exceptionFromInterpreter_ir.kt:7)
/exceptionFromInterpreter_ir.kt:6:26: error: Cannot evaluate constant expression: / by zero
/exceptionFromInterpreter_ir.kt:8:39: error: An exception occur while evaluating const value initializer:
Exception java.lang.IllegalArgumentException: marginPrefix must be non-blank string.
at ExceptionFromInterpreter_irKt.<clinit>(exceptionFromInterpreter_ir.kt:8)
/exceptionFromInterpreter_ir.kt:7:39: error: Cannot evaluate constant expression: marginPrefix must be non-blank string.
/exceptionFromInterpreter_ir.kt:12:4: error: An exception occur while evaluating const value initializer:
Exception java.lang.ArithmeticException: / by zero
at ExceptionFromInterpreter_irKt.<clinit>(exceptionFromInterpreter_ir.kt:12)
/exceptionFromInterpreter_ir.kt:11:4: error: Cannot evaluate constant expression: / by zero
@@ -6,7 +6,6 @@ fun append(sb: StringBuilder, value: CharSequence, start: Int, end: Int): String
const val a = <!EVALUATED: `Some string with not zero length!!!`!>append(StringBuilder("Some string with not zero length"), "!!!", 0, 3)<!>
const val b = <!WAS_NOT_EVALUATED: `
Exception java.lang.IndexOutOfBoundsException: start -1, end 0, s.length() 3
at java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:539)
at java.lang.StringBuilder.append(StringBuilder.java:175)
at <JDK>
at ExceptionFromWrapperKt.append(exceptionFromWrapper.kt:3)
at ExceptionFromWrapperKt.<clinit>(exceptionFromWrapper.kt:7)`!>append(StringBuilder("Some string with not zero length"), "!!!", -1, 0)<!>