improved error message reporting
svn: r11475
This commit is contained in:
parent
0545787e14
commit
fdc3e94361
|
@ -340,7 +340,8 @@
|
||||||
(with-handlers ([exn:fail?
|
(with-handlers ([exn:fail?
|
||||||
(lambda (e)
|
(lambda (e)
|
||||||
(set! critical-errors
|
(set! critical-errors
|
||||||
(cons (format "Error generating scribble documentation: ~a" (exn-message e)) critical-errors)))])
|
(cons (format "Error generating scribble documentation: ~a" (render-exn e))
|
||||||
|
critical-errors)))])
|
||||||
(unless (list? scribble-files)
|
(unless (list? scribble-files)
|
||||||
(error (format "malformed scribblings field; expected (listof (list string (listof symbol))), received ~e"
|
(error (format "malformed scribblings field; expected (listof (list string (listof symbol))), received ~e"
|
||||||
scribble-files)))
|
scribble-files)))
|
||||||
|
@ -539,11 +540,11 @@
|
||||||
(define (check-info.ss-sanity dir announce warn fail)
|
(define (check-info.ss-sanity dir announce warn fail)
|
||||||
(with-handlers ([exn:fail:read?
|
(with-handlers ([exn:fail:read?
|
||||||
(λ (e)
|
(λ (e)
|
||||||
(fail (format "Package has an unreadable info.ss file. ~a" (exn-message e)))
|
(fail (format "Package has an unreadable info.ss file. ~a" (render-exn e)))
|
||||||
#f)]
|
#f)]
|
||||||
[exn:fail:syntax?
|
[exn:fail:syntax?
|
||||||
(λ (e)
|
(λ (e)
|
||||||
(fail (format "Package's info.ss has an syntactically ill-formed info.ss file: ~a" (exn-message e)))
|
(fail (format "Package's info.ss has an syntactically ill-formed info.ss file: ~a" (render-exn e)))
|
||||||
#f)])
|
#f)])
|
||||||
(let ([i* (get-info/full dir)])
|
(let ([i* (get-info/full dir)])
|
||||||
(cond
|
(cond
|
||||||
|
@ -635,6 +636,14 @@
|
||||||
(announce "Version description: ~a\n" version)]))])
|
(announce "Version description: ~a\n" version)]))])
|
||||||
i*)))
|
i*)))
|
||||||
|
|
||||||
|
|
||||||
|
(define (render-exn e)
|
||||||
|
(let ([sp (open-output-string)])
|
||||||
|
(parameterize ([current-output-port sp]
|
||||||
|
[current-error-port sp])
|
||||||
|
((error-display-handler) (exn-message e) e))
|
||||||
|
(get-output-string sp)))
|
||||||
|
|
||||||
;; legal-categories : (listof symbol)
|
;; legal-categories : (listof symbol)
|
||||||
(define legal-categories
|
(define legal-categories
|
||||||
'(devtools net media xml datastructures io scientific
|
'(devtools net media xml datastructures io scientific
|
||||||
|
|
Loading…
Reference in New Issue
Block a user