try : ('a -> 'b) -> 'a -> 'b
Often, a HOL_ERR exception can propagate all the way to the top level. Unfortunately, the information held in the exception is not then printed. try can often display this information.
- mk_comb (T,F); ! Uncaught exception: ! HOL_ERR - try mk_comb (T,F); Exception raised at Term.mk_comb: incompatible types ! Uncaught exception: ! HOL_ERR
- try mk_comb (T, mk_abs(T,T)); ! Uncaught exception: ! HOL_ERR - mk_comb (T, mk_abs(T,T)) handle e => Raise e; Exception raised at Term.mk_abs: Bvar not a variable ! Uncaught exception: ! HOL_ERR