clarified user errors vs. failures, e.g. java.lang.StackOverflowError;
authorwenzelm
Thu, 12 Oct 2023 20:58:15 +0200
changeset 78767 aa67309a7960
parent 78766 5578341489cb
child 78768 280a228dc2f1
clarified user errors vs. failures, e.g. java.lang.StackOverflowError;
src/Pure/System/scala.scala
--- a/src/Pure/System/scala.scala	Thu Oct 12 14:59:59 2023 +0200
+++ b/src/Pure/System/scala.scala	Thu Oct 12 20:58:15 2023 +0200
@@ -289,7 +289,8 @@
           case Exn.Res(null) => (Tag.NULL, Nil)
           case Exn.Res(res) => (Tag.OK, res)
           case Exn.Exn(Exn.Interrupt()) => (Tag.INTERRUPT, Nil)
-          case Exn.Exn(e) => (Tag.ERROR, List(Bytes(Exn.message(e))))
+          case Exn.Exn(ERROR(msg)) => (Tag.ERROR, List(Bytes(msg)))
+          case Exn.Exn(e) => (Tag.FAIL, List(Bytes(Exn.message(e))))
         }
       case None => (Tag.FAIL, List(Bytes("Unknown Isabelle/Scala function: " + quote(name))))
     }