identify exceptions more robustly, to allow SML/NJ report toplevel errors without crash;
--- 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