src/Pure/General/exn.scala
changeset 73729 4b1d8beed8a3
parent 73367 77ef8bef0593
child 73963 59b6f0462086
--- a/src/Pure/General/exn.scala	Tue May 18 16:18:39 2021 +0200
+++ b/src/Pure/General/exn.scala	Tue May 18 17:02:45 2021 +0200
@@ -119,8 +119,7 @@
   /* message */
 
   def user_message(exn: Throwable): Option[String] =
-    if (exn.getClass == classOf[RuntimeException] ||
-        exn.getClass == classOf[User_Error])
+    if (exn.isInstanceOf[User_Error] || exn.getClass == classOf[RuntimeException])
     {
       Some(proper_string(exn.getMessage) getOrElse "Error")
     }