That sounds more in line with the guidelines described in PIL: https://www.lua.org/pil/8.3.htmlpgimeno wrote:The rationale is that it's worse to have the code work flawlessly in your computer, and then crash when the program is made public (case in point), than to have a hard time debugging shader code because of a mistyped variable, because when it works, it will (in principle) work for everyone.
Also, the status code provides debuggability.
Since you can't easily check for the error yourself beforehand, it should return nil and a status message rather than throwing an error (as a general guideline, according to PIL). Then if you want to throw on failure you can do assert(Shader:send(...)) and your status message will show up as the error message, being the second argument to assert. If you just want to check if there was an error without throwing, leave out the assert. With the current behavior, you don't have that choice.