From f2fb56d07f7d47c5acd864975f0f363a39de872d Mon Sep 17 00:00:00 2001 From: Eli Barzilay Date: Mon, 26 Jan 2009 20:55:36 +0000 Subject: [PATCH] when there is an error in loading, just log it, so the code can be fixed instead of killing the server svn: r13287 --- collects/handin-server/private/reloadable.ss | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/collects/handin-server/private/reloadable.ss b/collects/handin-server/private/reloadable.ss index defa9a8fc7..d8469e995c 100644 --- a/collects/handin-server/private/reloadable.ss +++ b/collects/handin-server/private/reloadable.ss @@ -10,8 +10,13 @@ (log-line "(re)loading module from ~a" modspec) (parameterize ([current-module-declare-name name] [compile-enforce-module-constants #f]) - (namespace-require '(only mzscheme module #%top-interaction)) - (load/use-compiled path)))) + ;; only notify, it's fine to reset the file timer, since there's no point + ;; in attempting to reload it yet again until it is edited. + (with-handlers ([exn? (lambda (e) + (log-line "error, module not reloaded (~a)" + (exn-message e)))]) + (namespace-require '(only mzscheme module #%top-interaction)) + (load/use-compiled path))))) ;; pulls out a value from a module, reloading the module if its source file was ;; modified