File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -44,14 +44,17 @@ external isCamlExceptionOrOpenVariant:
44
44
(* * internal use only *)
45
45
46
46
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
48
49
* in a Js.Exn.Error if given value is not an exn already. If
49
50
* [obj] is an exn, it will return [obj] without any changes.
50
51
*
51
52
* This function is mostly useful for cases where you want to unify a type of a value
52
53
* that potentially is either exn, a JS error, or any other JS value really (e.g. for
53
54
* a value passed to a Promise.catch callback)
54
55
*
56
+ * IMPORTANT: This is an internal API and may be changed / removed any time in the future.
57
+ *
55
58
* @example {[
56
59
* switch (Js.Exn.unsafeAnyToExn("test")) {
57
60
* | Js.Exn.Error(v) =>
You can’t perform that action at this time.
0 commit comments