According to Dinnerbone, "Functions will be completely parsed & cached on load. This means if there's any command that isn't correct for whatever reason, you will know about it on load."
However, loading a function from a datapack (both via loading the world and using /reload) fails silently so you won't know wheather parsing succeded. Functions containing only valid commands are still loaded when the datapack contains functions with invalid commands and can be executed properly, but other functions can't be used, printing either "Unknown function:" or java.lang.NullPointerException to chat when one using /function instead of throwing an error on loading.
How to reproduce:
Create a data pack, add a .mcfunction file with invalid commands, load the world or reload data packs and try to execute the function.
Attachments
Comments 6
Yes, but it doesn't say whether it fails on load. According to Dinnerbone: "Functions will be completely parsed & cached on load. This means if there's any command that isn't correct for whatever reason, you will know about it on load."
If it errors, it doesn't load and doesn't get added to the list of loaded functions, this is by design.