[project @ 2005-06-28 10:08:45 by unknown_lamer]
[clinton/bobotpp.git] / source / BotInterp.C
index 43724c8..01ba996 100644 (file)
@@ -52,13 +52,10 @@ BotInterp::LoadScript(String filename)
   Interp::LoadScript(bot, filename);
 }
 
-void
-BotInterp::ScriptLog(SCM throw_args)
+SCM
+BotInterp::ScriptLog()
 {
-  scm_display_error_message(SCM_CADR (throw_args),
-                            SCM_CADDR (throw_args),
-                            logPort);
-  scm_flush(logPort);
+  return logPort;
 }
 
 namespace
@@ -117,10 +114,10 @@ BotInterp::RunHooks(int hooktype, String match, SCM args)
                         SCM_UNDEFINED, SCM_UNDEFINED) != SCM_BOOL_F)
       {
        wd.func = (*it)->function;
-       result = gh_catch(SCM_BOOL_T, 
-                         (scm_t_catch_body) scm_apply_wrapper,
-                         static_cast<void *> (&wd), 
-                         (scm_t_catch_handler) Interp::ErrorHandler, 0);
+       result = scm_internal_catch(SCM_BOOL_T, 
+                                   (scm_t_catch_body) lazy_apply_wrapper,
+                                   static_cast<void *> (&wd), 
+                                   (scm_t_catch_handler) empty_handler, 0);
        if (! (*it)->fallthru)
          break;
     }
@@ -170,8 +167,9 @@ BotInterp::RunTimers(int now)
   while (it != it2) {
     if ((*it)->when <= now) {
       wd.func = (*it)->function;
-      gh_catch(SCM_BOOL_T, (scm_t_catch_body) scm_apply_wrapper,
-               (void *)&wd, (scm_t_catch_handler) Interp::ErrorHandler, 0);
+      scm_internal_catch(SCM_BOOL_T,
+                    (scm_t_catch_body) lazy_apply_wrapper, (void *)&wd,
+                    (scm_t_catch_handler) empty_handler, 0);
       scm_gc_unprotect_object(wd.func);
       it3 = it;
       ++it3;