diff --git a/src/main.lisp b/src/main.lisp index 6553dbd..a34c3bf 100644 --- a/src/main.lisp +++ b/src/main.lisp @@ -165,9 +165,10 @@ #'(lambda (condition) (log-message :fatal "We have a situation here.") (print-backtrace condition debug *standard-output*)))) - - (run-commands (fad:canonical-pathname filename) - :start-logger nil) + (let ((truename (probe-file filename))) + (if truename + (run-commands truename :start-logger nil) + (log-message :error "Can not find file: ~s" filename))) (format t "~&")) (condition (c) diff --git a/src/parser.lisp b/src/parser.lisp index 4b92a97..dc589f3 100644 --- a/src/parser.lisp +++ b/src/parser.lisp @@ -1862,7 +1862,9 @@ load database "The command could be using from :inline, in which case we want to parse as much as possible then use the command against an already opened stream where we moved at the beginning of the data." - (log-message :log "Parsing commands from file ~s~%" filename) + (if filename + (log-message :log "Parsing commands from file ~s~%" filename) + (error "Can not find file: ~s" maybe-relative-filename)) (process-relative-pathnames filename