Advertisement
Guest User

Untitled

a guest
Aug 5th, 2016
129
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.96 KB | None | 0 0
  1. freehck@ws-kashin:~/prog/ocaml-error% cat catcher.ml
  2. let raiser () =
  3. raise Not_found
  4.  
  5. let catcher () =
  6. try
  7. raiser ()
  8. with exn ->
  9. raise exn
  10.  
  11. let _ = catcher ()
  12. freehck@ws-kashin:~/prog/ocaml-error% ocamlc -g catcher.ml -o catcher-ocamlc
  13. freehck@ws-kashin:~/prog/ocaml-error% ocamlopt -g catcher.ml -o catcher-ocamlopt
  14. freehck@ws-kashin:~/prog/ocaml-error% ./catcher-ocamlc
  15. Fatal error: exception Not_found
  16. Raised at file "catcher.ml", line 2, characters 8-17
  17. Called from file "catcher.ml", line 6, characters 4-13
  18. Re-raised at file "catcher.ml", line 8, characters 4-13
  19. Called from file "catcher.ml", line 10, characters 8-18
  20. freehck@ws-kashin:~/prog/ocaml-error% ./catcher-ocamlopt
  21. Fatal error: exception Not_found
  22. Raised by primitive operation at file "catcher.ml", line 6, characters 4-13
  23. Re-raised at file "catcher.ml", line 8, characters 10-13
  24. Called from file "catcher.ml", line 10, characters 8-18
  25. freehck@ws-kashin:~/prog/ocaml-error%
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement