ref #56 exceptions are serializable

+fixed ambigity betwee lyng/kotln toString, added directional parameter to kotlin
This commit is contained in:
sergeych committed 2025-08-22 09:57:36 +03:00
1 parent 4b613fda7c
commit c8e8bdc466
10 files changed
+148 -58

No files matched your search

+13 -8
View File
@@ -2035,7 +2035,7 @@ class ScriptTest {
@Test
fun testThrowFromKotlin() = runTest {
val c = Scope()
val c = Script.newScope()
c.addFn("callThrow") {
raiseIllegalArgument("fromKotlin")
}
@@ -3112,13 +3112,18 @@ class ScriptTest {
require(false)
}
catch (e) {
println(e)
println(e.getStackTrace())
for( t in e.getStackTrace() ) {
println(t)
}
// val coded = Lynon.encode(e)
// println(coded.toDump())
println(e.stackTrace)
e.printStackTrace()
val coded = Lynon.encode(e)
val decoded = Lynon.decode(coded)
assertEquals( e::class, decoded::class )
assertEquals( e.stackTrace, decoded.stackTrace )
assertEquals( e.message, decoded.message )
println("-------------------- e")
println(e.toString())
println("-------------------- dee")
println(decoded.toString())
// assertEquals( e.toString(), decoded.toString() )
}
""".trimIndent()
)