Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- freehck@ws-kashin:~/prog/ocaml-error% cat catcher.ml
- let raiser () =
- raise Not_found
- let catcher () =
- try
- raiser ()
- with 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
- 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 8, characters 4-13
- Called from file "catcher.ml", line 10, characters 8-18
- freehck@ws-kashin:~/prog/ocaml-error% ./catcher-ocamlopt
- 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 8, characters 10-13
- Called from file "catcher.ml", line 10, characters 8-18
- freehck@ws-kashin:~/prog/ocaml-error%
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement