From 07d6df5ab4e821e1e2cf3bf2a15a9d5416fb15c6 Mon Sep 17 00:00:00 2001 From: Eli Barzilay Date: Tue, 25 Sep 2007 04:24:30 +0000 Subject: [PATCH] show a bad-access file in the log svn: r7411 --- .../handin-server/status-web-root/servlets/status.ss | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/collects/handin-server/status-web-root/servlets/status.ss b/collects/handin-server/status-web-root/servlets/status.ss index e06029f61c..7a92290743 100644 --- a/collects/handin-server/status-web-root/servlets/status.ss +++ b/collects/handin-server/status-web-root/servlets/status.ss @@ -167,14 +167,15 @@ [else #f]) (loop base (cdr elts))))))) (define file (build-path server-dir tag)) - (with-handlers ([exn:fail? (lambda (exn) - (log-line "Status exception: ~s" exn) - (make-page "Error" "Illegal file access"))]) + (with-handlers ([exn:fail? + (lambda (exn) + (log-line "Status exception: ~a" (exn-message exn)) + (make-page "Error" "Illegal file access"))]) ;; Make sure the user is allowed to read the requested file: (or (check file `(,who *) #t) (check file `(#rx"^solution") #f) (check file `(#rx"^solution" *) #f) - (error "Boom!")) + (error 'download "bad file access for ~s: ~a" who file)) (log-line "Status file-get: ~s ~a" who file) (hook 'status-file-get `([username ,(string->symbol who)] [file ,file])) ;; Return the downloaded file