add missing file error

pull/9/head
Matthew Butterick 11 years ago
parent 0db3229464
commit 7c2c3a0084

@ -37,6 +37,8 @@
(with-handlers ([exn:fail? (λ(exn) (error (format "cached-require: ~a is not a valid path" path-string)))])
(->complete-path path-string)))
(when (not (file-exists? path)) (error (format "cached-require: ~a does not exist" (path->string path))))
(when (or (not (cache-has-key? path))
(> (file-or-directory-modify-seconds path) (hash-ref (cache-ref path) 'mod-time)))
(cache path))

Loading…
Cancel
Save