diff --git a/scheme/httpd/surflets/web-server/root/surflets/admin-profiling.scm b/scheme/httpd/surflets/web-server/root/surflets/admin-profiling.scm index fce8d21..ddfcf28 100644 --- a/scheme/httpd/surflets/web-server/root/surflets/admin-profiling.scm +++ b/scheme/httpd/surflets/web-server/root/surflets/admin-profiling.scm @@ -11,6 +11,7 @@ let-opt receiving primitives + handle-fatal-error ) (begin @@ -310,10 +311,13 @@ plot '~a' title 'SUrflet Profiling ~a' with lines" (profile req)) (define (search-executable exec-name) - (receive (status ports) (run/collecting (1) (which ,exec-name)) - (if (zero? status) - (read-line ports) - ""))) + (with-fatal-error-handler + ;; If `which' is unavailable, return nothing. + (lambda (condition decline) "") + (receive (status ports) (run/collecting (1) (which ,exec-name)) + (if (zero? status) + (read-line ports) + "")))) (define (emph text) `(font (@ (color "red")) ,text)) @@ -327,5 +331,4 @@ plot '~a' title 'SUrflet Profiling ~a' with lines" `(tr (td (@ (colspan 2)) ,(emph "Note: There is no executable.")))))) -;; TODO: check `where' tool )) \ No newline at end of file