|
|
@ -53,13 +53,11 @@
|
|
|
|
;; but if something else is amiss, we want to let it bubble up
|
|
|
|
;; but if something else is amiss, we want to let it bubble up
|
|
|
|
(define setup-module-path (find-nearest-default-directory-require dir))
|
|
|
|
(define setup-module-path (find-nearest-default-directory-require dir))
|
|
|
|
(with-handlers ([exn:fail:contract? (λ (exn) DEFAULT-NAME)]
|
|
|
|
(with-handlers ([exn:fail:contract? (λ (exn) DEFAULT-NAME)]
|
|
|
|
;; a syntax error in pollen.rkt will arrive here
|
|
|
|
;; certain errors in pollen.rkt will arrive here
|
|
|
|
;; exn:fail:read? for a syntactic failure (e.g., missing paren)
|
|
|
|
;; they do not indicate a defective setup module, so pass them through
|
|
|
|
;; exn:fail:syntax? for a semantic failure, (e.g., unbound identifier)
|
|
|
|
[exn:fail:read? raise] ; syntactic failure (e.g., missing paren)
|
|
|
|
;; it does not indicate a defective setup module,
|
|
|
|
[exn:fail:syntax? raise] ; semantic failure (e.g., unbound identifier)
|
|
|
|
;; so pass it through
|
|
|
|
[exn:fail:filesystem? raise] ; filesystem failure (e.g., too many open files)
|
|
|
|
[exn:fail:read? raise]
|
|
|
|
|
|
|
|
[exn:fail:syntax? raise]
|
|
|
|
|
|
|
|
[exn? (λ (exn) (raise-user-error 'pollen/setup
|
|
|
|
[exn? (λ (exn) (raise-user-error 'pollen/setup
|
|
|
|
(format "defective `setup` submodule in ~v\n~a" (path->string setup-module-path) (exn-message exn))))])
|
|
|
|
(format "defective `setup` submodule in ~v\n~a" (path->string setup-module-path) (exn-message exn))))])
|
|
|
|
(dynamic-require `(submod ,setup-module-path WORLD-SUBMOD)
|
|
|
|
(dynamic-require `(submod ,setup-module-path WORLD-SUBMOD)
|
|
|
|