If you have a bug in your lua code which is run during setup(), that will cause a lua error which is reported to the print window. All good and proper.
Also, the subsequent code in setup() after your error will not be run. Also reasonable.
Your code under draw() will still be run. This produces more errors, because some of your setup code was not run. This situation was a bit perplexing to me. Not for long but it certainly doesn’t adhere to the principle of least surprise. I was thinking Oh yes, there is an error on line 20 in my setup. But how come there are also errors on line 550 in my drawing code? What is up with that suddenly? … Goes off to read his drawing code.
(An aside. I notice that a lua error raised in any code under draw() will cause a [Pause], and you can [Play] your code even though it has raised errors. This is quite a nice feature, and not what I would have expected but at least the message “Pausing playback” gives you all the information. There is no such message with an error raised during setup() lua code, because play back is not paused. Also reasonable).