identify exceptions more robustly, to allow SML/NJ report toplevel errors without crash;
authorwenzelm
Fri, 22 Feb 2013 17:02:00 +0100
changeset 51242 a8e664e4fb5f
parent 51241 83252b0605be
child 51243 ffd9d7f73e65
identify exceptions more robustly, to allow SML/NJ report toplevel errors without crash;
src/Pure/Isar/runtime.ML
--- a/src/Pure/Isar/runtime.ML	Fri Feb 22 16:52:10 2013 +0100
+++ b/src/Pure/Isar/runtime.ML	Fri Feb 22 17:02:00 2013 +0100
@@ -52,7 +52,8 @@
   let
     val exn' = Par_Exn.identify [] exn;
     val exec_id = Properties.get (Exn_Properties.get exn') Markup.exec_idN;
-  in ((Par_Exn.the_serial exn', exn'), exec_id) end;
+    val i = Par_Exn.the_serial exn' handle Option.Option => serial ();
+  in ((i, exn'), exec_id) end;
 
 fun flatten _ (CONTEXT (ctxt, exn)) = flatten (SOME ctxt) exn
   | flatten context (Exn.EXCEPTIONS exns) = maps (flatten context) exns