Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # The problem with ocaml 4.01.0 and 4.02.1
- freehck@ws-kashin:~/prog/ocaml-error% cat catcher.ml
- let raiser () =
- raise Not_found
- let catcher () =
- try
- raiser ()
- with exn ->
- print_endline ("Exception: " ^ (Printexc.to_string exn));
- raise exn
- let _ = catcher ()
- freehck@ws-kashin:~/prog/ocaml-error% ocamlc -g catcher.ml -o catcher-ocamlc
- freehck@ws-kashin:~/prog/ocaml-error% ocamlopt -g catcher.ml -o catcher-ocamlopt
- freehck@ws-kashin:~/prog/ocaml-error% ./catcher-ocamlc
- Exception: Not_found
- Fatal error: exception Not_found
- Raised at file "catcher.ml", line 2, characters 8-17
- Called from file "catcher.ml", line 6, characters 4-13
- Re-raised at file "catcher.ml", line 9, characters 10-13
- Called from file "catcher.ml", line 11, characters 8-18
- freehck@ws-kashin:~/prog/ocaml-error% ./catcher-ocamlopt
- Exception: Not_found
- Fatal error: exception Not_found
- Raised by primitive operation at file "catcher.ml", line 6, characters 4-13
- Re-raised at file "catcher.ml", line 9, characters 10-13
- Called from file "catcher.ml", line 11, characters 8-18
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement