let protect exn =
  match protected exn with
    | Some(plugin,reason) -> plugin , reason
    | None -> raise exn