# HG changeset patch # User wenzelm # Date 1284049266 -7200 # Node ID 7189a138dd6c6d1b4d836e3d6294469c4b2377ef # Parent be1acdcd55dcd8d31581bf749abbc69a416e6a9f refined Runtime.toplevel_error/Document.run_command: let interrupts pass unhindered; diff -r be1acdcd55dc -r 7189a138dd6c src/Pure/Isar/runtime.ML --- a/src/Pure/Isar/runtime.ML Thu Sep 09 18:18:34 2010 +0200 +++ b/src/Pure/Isar/runtime.ML Thu Sep 09 18:21:06 2010 +0200 @@ -110,9 +110,14 @@ |> debugging |> Future.interruptible_task; -fun toplevel_error output_exn f x = - let val ctxt = Option.map Context.proof_of (Context.thread_data ()) - in f x handle exn => (output_exn (exn_context ctxt exn); raise TOPLEVEL_ERROR) end; +fun toplevel_error output_exn f x = f x + handle exn => + if Exn.is_interrupt exn then reraise exn + else + let + val ctxt = Option.map Context.proof_of (Context.thread_data ()); + val _ = output_exn (exn_context ctxt exn); + in raise TOPLEVEL_ERROR end; end; diff -r be1acdcd55dc -r 7189a138dd6c src/Pure/PIDE/document.ML --- a/src/Pure/PIDE/document.ML Thu Sep 09 18:18:34 2010 +0200 +++ b/src/Pure/PIDE/document.ML Thu Sep 09 18:21:06 2010 +0200 @@ -238,7 +238,10 @@ if int then () else async_state tr st')); in result end | Exn.Exn exn => - (Toplevel.error_msg tr (ML_Compiler.exn_message exn); Toplevel.status tr Markup.failed; NONE)) + if Exn.is_interrupt exn then reraise exn + else + (Toplevel.error_msg tr (ML_Compiler.exn_message exn); + Toplevel.status tr Markup.failed; NONE)); end;