JS: better error reporting for V8 runner
In case of stack overflow both the code and the memory release caused an exception. Only the latter was shown, and it did not contain much useful information.
This commit is contained in:
committed by
Anton Bannykh
parent
b61a520da9
commit
bb1660c688
@@ -171,11 +171,19 @@ object V8IrJsTestChecker : AbstractJsTestChecker() {
|
||||
|
||||
val v8 = ScriptEngineV8()
|
||||
|
||||
return try {
|
||||
val v = try {
|
||||
files.forEach { v8.loadFile(it) }
|
||||
v8.f()
|
||||
} finally {
|
||||
v8.release()
|
||||
} catch (t: Throwable) {
|
||||
try {
|
||||
v8.release()
|
||||
} finally {
|
||||
// Don't mask the original exception
|
||||
throw t
|
||||
}
|
||||
}
|
||||
v8.release()
|
||||
|
||||
return v
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user