Fooling around, getting comfortable with newLISP! Currently learning to load modules; trap load errors; checking for existence of files, etc. I cobbled together the following:
Code: Select all
(define (load_mod x)
(if (file? (append (env "NEWLISPDIR") "/modules/" x)) (print "Loading module: " x)
(throw-error "module does not exist")
)
)
Is there a way to absolutely tell that the file did get loaded?
Should "load_mod" be called from within a "catch", e.g.
(catch (load_mod "cgi.lsp")) ?