When pdflatex encounters a character it cannot encode into a font, it dies and produces a non-zero exit code. By contrast, lualatex happily produces an exit code of 0 and simply prints a warning:
Missing character: There is no ȳ (U+0233) in font [lmmono10-regular]:!
I regard this as a fatal error, since it failed to typeset the document. I cannot find any way to make lualatex produce a non-zero exit code in this case, so I have to parse the log file looking for these.
This seems like a gross oversight of lualatex - are there any other cases where it fails to typeset the document but still produces an exit code of 0?
\tracinglostchars=3
pdflatex
, by default, would have exit code 0 if a character doesn't exist in a font.