Skip to content

Commit

Permalink
Add doc to exception_without_parameter.mli
Browse files Browse the repository at this point in the history
  • Loading branch information
antoinepouille committed Sep 26, 2024
1 parent 7b288fc commit d51243f
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 6 deletions.
2 changes: 1 addition & 1 deletion core/parameters/exception_without_parameter.ml
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ let to_json exceptions_caught_and_uncaught =
( "caught",
JsonUtil.of_list caught_exception_to_json
exceptions_caught_and_uncaught.caught_error_list );
( "caught",
( "caught_to_ui",
JsonUtil.of_list caught_exception_to_json
exceptions_caught_and_uncaught.caught_error_list_to_ui );
( "uncaught",
Expand Down
28 changes: 23 additions & 5 deletions core/parameters/exception_without_parameter.mli
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,13 @@
* en Automatique. All rights reserved. This file is distributed
* under the terms of the GNU Library General Public License *)

(* The logic in this files describes a `degraded` mode for exceptions, before
the remanent_parameters were loaded.
these exceptions did not stop execution, so `uncaught` and `caught` may not
be good naming here. `caught` here basically add a trace to uncaught info
TODO: revamp/rename this?
*)

type uncaught_exception

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

val add_uncaught_error :
?to_ui:bool -> uncaught_exception -> exceptions_caught_and_uncaught -> exceptions_caught_and_uncaught
?to_ui:bool ->
uncaught_exception ->
exceptions_caught_and_uncaught ->
exceptions_caught_and_uncaught

val stringlist_of_exception : exn -> string list -> string list
val stringlist_of_uncaught : uncaught_exception -> string list -> string list
Expand All @@ -41,10 +51,18 @@ val pp_exception : Format.formatter -> exn -> unit
val pp_uncaught : Format.formatter -> uncaught_exception -> unit
val pp_caught : Format.formatter -> caught_exception -> unit
val empty_exceptions_caught_and_uncaught : exceptions_caught_and_uncaught
val is_empty_exceptions_caught_and_uncaught : exceptions_caught_and_uncaught -> bool
val get_caught_exception_list : exceptions_caught_and_uncaught -> caught_exception list
val get_caught_exception_list_to_ui : exceptions_caught_and_uncaught -> caught_exception list
val get_uncaught_exception_list : exceptions_caught_and_uncaught -> uncaught_exception list

val is_empty_exceptions_caught_and_uncaught :
exceptions_caught_and_uncaught -> bool

val get_caught_exception_list :
exceptions_caught_and_uncaught -> caught_exception list

val get_caught_exception_list_to_ui :
exceptions_caught_and_uncaught -> caught_exception list

val get_uncaught_exception_list :
exceptions_caught_and_uncaught -> uncaught_exception list

val get_uncaught_exception_list_to_ui :
exceptions_caught_and_uncaught -> uncaught_exception list
Expand Down

0 comments on commit d51243f

Please sign in to comment.