diff --git a/core/parameters/exception_without_parameter.ml b/core/parameters/exception_without_parameter.ml index 6ff75c776..0e10b10d2 100644 --- a/core/parameters/exception_without_parameter.ml +++ b/core/parameters/exception_without_parameter.ml @@ -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", diff --git a/core/parameters/exception_without_parameter.mli b/core/parameters/exception_without_parameter.mli index 718e398e5..9ef88d12e 100644 --- a/core/parameters/exception_without_parameter.mli +++ b/core/parameters/exception_without_parameter.mli @@ -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 @@ -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 @@ -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