node-ssi icon indicating copy to clipboard operation
node-ssi copied to clipboard

Better handling No file error

Open kidwm opened this issue 10 years ago • 2 comments

I've got this error output:

Warning: ENOENT, no such file or directory '/home/user/Projects/repo/root.html' Used --force, continuing.

In real case, When Apache does not find the file in #include, it would print the message in output file: [an error occurred while processing this directive]

kidwm avatar Oct 17 '14 18:10 kidwm

I can and should provide better error logging for this type of situation. I will make sure it outputs something along the lines of "Could not include file foo.html from bar.html" when you have a missing file.

What I don't like, and maybe this boils down to a philosophical position, is the idea of outputting the error into the HTML and continuing on with just a log statement. When serving up dynamically parsed SSI on a webserver, that might make more sense so you don't scuttle an entire site because the footer is missing. In the case of this tool, it's a command-line utility and it should fail on that as it is a compile error in my eyes.

67726e avatar Oct 17 '14 21:10 67726e

Exactly, I agree with you.

kidwm avatar Oct 20 '14 07:10 kidwm