From 8cd2bd26d77338050a72ab5553151284855f535d Mon Sep 17 00:00:00 2001 From: Clinton Ebadi Date: Sun, 10 May 2020 14:59:38 -0400 Subject: [PATCH] Convert remaining old style `catch' to `with-throw-handler' --- source/BotInterp.C | 23 +++++++++++++---------- source/Parser.C | 10 ++++++---- 2 files changed, 19 insertions(+), 14 deletions(-) diff --git a/source/BotInterp.C b/source/BotInterp.C index b106dfa..32801f1 100644 --- a/source/BotInterp.C +++ b/source/BotInterp.C @@ -180,11 +180,13 @@ BotInterp::RunHooks(int hooktype, std::string match, SCM args) { bool fallthru_p = (*it)->fallthru; wd.func = (*it)->function; - result = scm_internal_catch(SCM_BOOL_T, - (scm_t_catch_body) - Interp::LazyApplyWrapper, - static_cast (&wd), - (scm_t_catch_handler) Interp::EmptyHandler, 0); + result = scm_c_with_throw_handler (SCM_BOOL_T, + (scm_t_catch_body) + Interp::LazyApplyWrapper, + static_cast (&wd), + (scm_t_catch_handler) Interp::EmptyHandler, + 0, + 0); if (!fallthru_p) break; } @@ -251,11 +253,12 @@ BotInterp::RunTimers(int now) { wd.func = current_timer.function; - scm_internal_catch (SCM_BOOL_T, - (scm_t_catch_body) Interp::LazyApplyWrapper, - (void *)&wd, - (scm_t_catch_handler) Interp::EmptyHandler, - 0); + scm_c_with_throw_handler (SCM_BOOL_T, + (scm_t_catch_body) Interp::LazyApplyWrapper, + (void *)&wd, + (scm_t_catch_handler) Interp::EmptyHandler, + 0, + 0); // The timer list may have been modified by the timer // callback; if it has in such a way that the first queue diff --git a/source/Parser.C b/source/Parser.C index 254e6b9..de4d29d 100644 --- a/source/Parser.C +++ b/source/Parser.C @@ -1078,9 +1078,11 @@ Parser::parseScriptFunction (ServerConnection * cnx, struct wrapper_data wd; wd.func = scmFunc; wd.args = args_list; - scm_internal_catch (SCM_BOOL_T, - (scm_t_catch_body) Interp::LazyApplyWrapper, - (void *) &wd, - (scm_t_catch_handler) Interp::EmptyHandler, 0); + scm_c_with_throw_handler (SCM_BOOL_T, + (scm_t_catch_body) Interp::LazyApplyWrapper, + (void *) &wd, + (scm_t_catch_handler) Interp::EmptyHandler, + 0, + 0); } #endif -- 2.20.1