node-ssi
node-ssi copied to clipboard
Better handling No file error
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]
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.
Exactly, I agree with you.