- match exn with
- RefineFailure _ -> raise (HExtlib.Localized (loc exn,RefineFailure msg))
- | Uncertain _ -> raise (HExtlib.Localized (loc exn,Uncertain msg))
- | _ -> assert false
+ let exn' =
+ match exn with
+ RefineFailure _ -> RefineFailure msg
+ | Uncertain _ -> Uncertain msg
+ | _ -> assert false
+ in
+ raise (HExtlib.Localized (loc exn',exn'))