Lua template should fail to launch on lua error

Without this change, the app continues to run, attempts to access the
badly-initialised scene and issues more error messages. This causes
further errors every frame, covering up the original error in the output
Merge pull request #6575 from twhittock/lua-main-error-no-launch

Lua template should fail to launch on lua error