Skip to content

Commit 21bfd93

Browse files
Add doc to exception_without_parameter.mli
1 parent fc9521d commit 21bfd93

File tree

2 files changed

+24
-6
lines changed

2 files changed

+24
-6
lines changed

core/parameters/exception_without_parameter.ml

+1-1
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ let to_json exceptions_caught_and_uncaught =
243243
( "caught",
244244
JsonUtil.of_list caught_exception_to_json
245245
exceptions_caught_and_uncaught.caught_error_list );
246-
( "caught",
246+
( "caught_to_ui",
247247
JsonUtil.of_list caught_exception_to_json
248248
exceptions_caught_and_uncaught.caught_error_list_to_ui );
249249
( "uncaught",

core/parameters/exception_without_parameter.mli

+23-5
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,13 @@
1212
* en Automatique. All rights reserved. This file is distributed
1313
* under the terms of the GNU Library General Public License *)
1414

15+
(* The logic in this files describes a `degraded` mode for exceptions, before
16+
the remanent_parameters were loaded.
17+
these exceptions did not stop execution, so `uncaught` and `caught` may not
18+
be good naming here. `caught` here basically add a trace to uncaught info
19+
TODO: revamp/rename this?
20+
*)
21+
1522
type uncaught_exception
1623

1724
exception Uncaught_exception of uncaught_exception
@@ -31,7 +38,10 @@ val build_caught_exception :
3138
string option -> string option -> exn -> string list -> caught_exception
3239

3340
val add_uncaught_error :
34-
?to_ui:bool -> uncaught_exception -> exceptions_caught_and_uncaught -> exceptions_caught_and_uncaught
41+
?to_ui:bool ->
42+
uncaught_exception ->
43+
exceptions_caught_and_uncaught ->
44+
exceptions_caught_and_uncaught
3545

3646
val stringlist_of_exception : exn -> string list -> string list
3747
val stringlist_of_uncaught : uncaught_exception -> string list -> string list
@@ -41,10 +51,18 @@ val pp_exception : Format.formatter -> exn -> unit
4151
val pp_uncaught : Format.formatter -> uncaught_exception -> unit
4252
val pp_caught : Format.formatter -> caught_exception -> unit
4353
val empty_exceptions_caught_and_uncaught : exceptions_caught_and_uncaught
44-
val is_empty_exceptions_caught_and_uncaught : exceptions_caught_and_uncaught -> bool
45-
val get_caught_exception_list : exceptions_caught_and_uncaught -> caught_exception list
46-
val get_caught_exception_list_to_ui : exceptions_caught_and_uncaught -> caught_exception list
47-
val get_uncaught_exception_list : exceptions_caught_and_uncaught -> uncaught_exception list
54+
55+
val is_empty_exceptions_caught_and_uncaught :
56+
exceptions_caught_and_uncaught -> bool
57+
58+
val get_caught_exception_list :
59+
exceptions_caught_and_uncaught -> caught_exception list
60+
61+
val get_caught_exception_list_to_ui :
62+
exceptions_caught_and_uncaught -> caught_exception list
63+
64+
val get_uncaught_exception_list :
65+
exceptions_caught_and_uncaught -> uncaught_exception list
4866

4967
val get_uncaught_exception_list_to_ui :
5068
exceptions_caught_and_uncaught -> uncaught_exception list

0 commit comments

Comments
 (0)