This commit is contained in:
parent
aa2ff7b2f0
commit
2f3113f55d
11742 changed files with 1223940 additions and 0 deletions
23
unikernel/duniverse/base/test/test_not_found.mlt
Normal file
23
unikernel/duniverse/base/test/test_not_found.mlt
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
open Base
|
||||
open Expect_test_helpers_base;;
|
||||
|
||||
print_s [%sexp (Not_found_s [%message "foo"] : exn)]
|
||||
|
||||
[%%expect
|
||||
{|
|
||||
(Not_found_s foo)
|
||||
|}]
|
||||
;;
|
||||
|
||||
Not_found
|
||||
|
||||
[%%expect
|
||||
{|
|
||||
Line _, characters _-_:
|
||||
Error (alert deprecated): Not_found
|
||||
[2016-09] this element comes from the stdlib distributed with OCaml.
|
||||
Instead of raising [Not_found], consider using [raise_s] with an informative error
|
||||
message. If code needs to distinguish [Not_found] from other exceptions, please change
|
||||
it to handle both [Not_found] and [Not_found_s]. Then, instead of raising [Not_found],
|
||||
raise [Not_found_s] with an informative error message.
|
||||
|}]
|
||||
Loading…
Add table
Add a link
Reference in a new issue