summaryrefslogtreecommitdiff
path: root/lib/kernel/layer.ml
diff options
context:
space:
mode:
Diffstat (limited to 'lib/kernel/layer.ml')
-rw-r--r--lib/kernel/layer.ml6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/kernel/layer.ml b/lib/kernel/layer.ml
index bf71206..515b052 100644
--- a/lib/kernel/layer.ml
+++ b/lib/kernel/layer.ml
@@ -52,5 +52,7 @@ let load rank_of_sexp path =
| sexp -> (
match t_of_sexp rank_of_sexp sexp with
| t -> Ok { t with entries = canonical t.entries }
- | exception Sexplib0.Sexp_conv_error.Of_sexp_error (exn, _) ->
- Error (Printf.sprintf "%s: %s" path (Printexc.to_string exn)))
+ (* [rank_of_sexp] is caller-supplied and may raise anything, not only
+ [Of_sexp_error] -- mirrors [Overlay.load]'s catch-all, so "never as
+ an exception" (layer.mli) actually holds. *)
+ | exception exn -> Error (Printf.sprintf "%s: %s" path (Printexc.to_string exn)))