Commit c9e17459 authored by Mário Pereira's avatar Mário Pereira

New exception Invalid_argument in ocaml.Pervasives

parent d2368670
......@@ -348,9 +348,10 @@ module ocaml.Sys
end
module ocaml.Pervasives
syntax exception Exit "Pervasives.Exit"
syntax exception Not_found "Not_found"
syntax val ocaml_assert "assert (%1)"
syntax exception Exit "Pervasives.Exit"
syntax exception Not_found "Not_found"
syntax val ocaml_assert "assert (%1)"
syntax exception Invalid_argument "Invalid_argument \"\""
end
module HighOrd
......
......@@ -30,6 +30,8 @@ module Pervasives
val ocaml_assert (b: bool) : unit
raises { AssertFailure }
exception Invalid_argument
end
module OCaml
......
......@@ -475,7 +475,7 @@ module Print = struct
and print_raise ~paren info xs fmt e_opt =
match query_syntax info.info_syn xs.xs_name, e_opt with
| Some s, None ->
fprintf fmt "raise %s" s
fprintf fmt "raise (%s)" s
| Some s, Some e ->
fprintf fmt (protect_on paren "raise (%a)")
(syntax_arguments s (print_expr info)) [e]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment