Skip to content

Commit b9c7a7d

Browse files
committed
Update Js_exn.anyToExnInternal comment
1 parent 6fe583f commit b9c7a7d

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

jscomp/others/js_exn.mli

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,14 +44,17 @@ external isCamlExceptionOrOpenVariant:
4444
(** internal use only *)
4545

4646
val anyToExnInternal: 'a -> exn
47-
(** [unsafeAnyToExn obj] will take any value [obj] and wrap it
47+
(**
48+
* [anyToExnInternal obj] will take any value [obj] and wrap it
4849
* in a Js.Exn.Error if given value is not an exn already. If
4950
* [obj] is an exn, it will return [obj] without any changes.
5051
*
5152
* This function is mostly useful for cases where you want to unify a type of a value
5253
* that potentially is either exn, a JS error, or any other JS value really (e.g. for
5354
* a value passed to a Promise.catch callback)
5455
*
56+
* IMPORTANT: This is an internal API and may be changed / removed any time in the future.
57+
*
5558
* @example {[
5659
* switch (Js.Exn.unsafeAnyToExn("test")) {
5760
* | Js.Exn.Error(v) =>

0 commit comments

Comments
 (0)