catch sxref failures and report as warnings when loading help data
svn: r8063
This commit is contained in:
parent
19a6edc664
commit
b78f8acb50
|
@ -40,7 +40,9 @@
|
||||||
[ci (send renderer collect null null)])
|
[ci (send renderer collect null null)])
|
||||||
(for-each (lambda (src)
|
(for-each (lambda (src)
|
||||||
(parameterize ([current-namespace (namespace-anchor->empty-namespace here)])
|
(parameterize ([current-namespace (namespace-anchor->empty-namespace here)])
|
||||||
(send renderer deserialize-info (src) ci)))
|
(let ([v (src)])
|
||||||
|
(when v
|
||||||
|
(send renderer deserialize-info v ci)))))
|
||||||
sources)
|
sources)
|
||||||
(make-xrefs renderer (send renderer resolve null null ci))))
|
(make-xrefs renderer (send renderer resolve null null ci))))
|
||||||
|
|
||||||
|
|
|
@ -401,12 +401,12 @@ first is a timeout value in seconds, and the second is a memory limit
|
||||||
in megabytes. Either one can be @scheme[#f] for disabling the
|
in megabytes. Either one can be @scheme[#f] for disabling the
|
||||||
corresponding limit; alternately, the parameter can be set to
|
corresponding limit; alternately, the parameter can be set to
|
||||||
@scheme[#f] to disable all limits (in case more are available in
|
@scheme[#f] to disable all limits (in case more are available in
|
||||||
future versions).
|
future versions). The default is @scheme[(list 30 20)].
|
||||||
|
|
||||||
When limits are set, @scheme[call-with-limits] (see below) is wrapped
|
When limits are set, @scheme[call-with-limits] (see below) is wrapped
|
||||||
around each use of the evaluator, so consuming too much time or memory
|
around each use of the evaluator, so consuming too much time or memory
|
||||||
results in an exception. You can change the limits of a running
|
results in an exception. Change the limits of a running evaluator
|
||||||
evaluator using @scheme[set-eval-limits].}
|
using @scheme[set-eval-limits].}
|
||||||
|
|
||||||
@; ----------------------------------------------------------------------
|
@; ----------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
|
@ -27,7 +27,8 @@ by @scheme[load-xref], @scheme[#f] otherwise.}
|
||||||
|
|
||||||
Creates a cross-reference record given a list of functions that each
|
Creates a cross-reference record given a list of functions that each
|
||||||
produce a serialized information obtained from @xmethod[render%
|
produce a serialized information obtained from @xmethod[render%
|
||||||
serialize-info].
|
serialize-info]. If a @scheme[sources] element produces @scheme[#f],
|
||||||
|
its result is ignored.
|
||||||
|
|
||||||
Since the format of serialized information is specific to a rendering
|
Since the format of serialized information is specific to a rendering
|
||||||
class, the optional @scheme[using-render%] argument accepts the
|
class, the optional @scheme[using-render%] argument accepts the
|
||||||
|
|
|
@ -41,7 +41,14 @@
|
||||||
dirs)))])
|
dirs)))])
|
||||||
(set! cached-xref (load-xref (map (lambda (dest)
|
(set! cached-xref (load-xref (map (lambda (dest)
|
||||||
(lambda ()
|
(lambda ()
|
||||||
(let ([r (with-input-from-file dest read)])
|
(with-handlers ([exn:fail? (lambda (exn)
|
||||||
(cadr r))))
|
(fprintf (current-error-port)
|
||||||
|
"WARNING: ~a\n"
|
||||||
|
(if (exn? exn)
|
||||||
|
(exn-message exn)
|
||||||
|
(format "~e" exn)))
|
||||||
|
#f)])
|
||||||
|
(let ([r (with-input-from-file dest read)])
|
||||||
|
(cadr r)))))
|
||||||
dests)))
|
dests)))
|
||||||
cached-xref))))
|
cached-xref))))
|
||||||
|
|
Loading…
Reference in New Issue
Block a user