adjust htdp so missing teachpacks just print error messages
and continue, rather than raising exceptions
This commit is contained in:
parent
b93cd5288b
commit
1a1c1feabc
|
@ -110,14 +110,7 @@
|
|||
|
||||
(drr:set-default 'drracket:htdp:last-set-teachpacks
|
||||
'()
|
||||
(λ (x)
|
||||
(and (list? x)
|
||||
(andmap (λ (x)
|
||||
(and (list? x)
|
||||
(pair? x)
|
||||
(eq? (car x) 'lib)
|
||||
(andmap string? (cdr x))))
|
||||
x))))
|
||||
(listof (cons/c 'lib (listof string?))))
|
||||
(drr:set-default 'drracket:defs/ints-horizontal #f boolean?)
|
||||
|
||||
(drr:set-default 'drracket:child-only-memory-limit (* 1024 1024 128)
|
||||
|
|
|
@ -98,12 +98,16 @@
|
|||
;; syntax objects that require them (tagged
|
||||
;; with stepper-skip-completely)
|
||||
(define (teachpacks->requires teachpacks)
|
||||
(filter
|
||||
values
|
||||
(for/list ([tp (in-list teachpacks)])
|
||||
(unless (file-exists? (build-path (apply collection-path (cddr tp))
|
||||
(cond
|
||||
[(file-exists? (build-path (apply collection-path (cddr tp))
|
||||
(cadr tp)))
|
||||
(error 'teachpack (missing-tp-message tp)))
|
||||
(stepper-skip
|
||||
(datum->syntax #f `(require ,tp)))))
|
||||
(datum->syntax #f `(require ,tp)))]
|
||||
[else
|
||||
(eprintf "~a\n" (missing-tp-message tp))]))))
|
||||
|
||||
(define (missing-tp-message x)
|
||||
(let* ([m (regexp-match #rx"/([^/]*)$" (cadr x))]
|
||||
|
|
Loading…
Reference in New Issue
Block a user