This is an automated email from the ASF dual-hosted git repository. jiahuili430 pushed a commit to branch fix-catch-warnings in repository https://gitbox.apache.org/repos/asf/couchdb.git
commit 9e15aaf006091f7b050d2c963ca4f4c29fc922bf Author: Jiahui Li <[email protected]> AuthorDate: Thu Nov 19 15:05:45 2026 -0600 Fix catch warnings: couch_epi --- src/couch_epi/src/couch_epi_functions_gen.erl | 4 ++-- src/couch_epi/src/couch_epi_module_keeper.erl | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/couch_epi/src/couch_epi_functions_gen.erl b/src/couch_epi/src/couch_epi_functions_gen.erl index d7364c044..a41816f26 100644 --- a/src/couch_epi/src/couch_epi_functions_gen.erl +++ b/src/couch_epi/src/couch_epi_functions_gen.erl @@ -340,7 +340,7 @@ do_dispatch( #opts{concurrent = true, ignore_errors = true} ) -> spawn(fun() -> - (catch Handle:dispatch(Module, Function, Args)) + ?TRY_CATCH(fun Handle:dispatch/3, [Module, Function, Args]) end); do_dispatch( Handle, @@ -349,7 +349,7 @@ do_dispatch( Args, #opts{ignore_errors = true} ) -> - (catch Handle:dispatch(Module, Function, Args)); + ?TRY_CATCH(fun Handle:dispatch/3, [Module, Function, Args]); do_dispatch( Handle, Module, diff --git a/src/couch_epi/src/couch_epi_module_keeper.erl b/src/couch_epi/src/couch_epi_module_keeper.erl index 97420ea7b..97d4cb47b 100644 --- a/src/couch_epi/src/couch_epi_module_keeper.erl +++ b/src/couch_epi/src/couch_epi_module_keeper.erl @@ -11,6 +11,7 @@ % the License. -module(couch_epi_module_keeper). +-include_lib("couch/include/couch_db.hrl"). -behaviour(gen_server). @@ -56,7 +57,7 @@ start_link(Type, Key, Codegen) -> ). stop(Server) -> - catch gen_server:call(Server, stop). + ?TRY_CATCH(fun gen_server:call/2, [Server, stop]). reload(Server) -> gen_server:call(Server, reload).
