Skip to content

Commit ccce3d3

Browse files
committed
Store cause of REPL compiler exception
1 parent 4e53dee commit ccce3d3

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

jupyter-lib/shared-compiler/src/main/kotlin/org/jetbrains/kotlinx/jupyter/exceptions/ReplCompilerException.kt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,10 @@ class ReplCompilerException(
1010
val errorResult: ResultWithDiagnostics.Failure? = null,
1111
message: String? = null
1212
) :
13-
ReplException(message ?: errorResult?.getErrors() ?: "") {
13+
ReplException(
14+
message ?: errorResult?.getErrors() ?: "",
15+
errorResult?.reports?.map { it.exception }?.firstOrNull()
16+
) {
1417

1518
val firstError = errorResult?.reports?.firstOrNull {
1619
it.severity == ScriptDiagnostic.Severity.ERROR || it.severity == ScriptDiagnostic.Severity.FATAL

0 commit comments

Comments
 (0)