lyte2d icon indicating copy to clipboard operation
lyte2d copied to clipboard

Better errors: unhandled error cases, host API errors

Open morew4rd opened this issue 2 years ago • 4 comments

  • lyte.load_image non-existing path
  • Shader compilation failures
  • lyte.is_key_pressed/is_key_down/etc with invalid value crashes
  • Syntax errors

Need to catch these and display them in the window instead of closing the window. Reporting on the console is a workaround but not all folks care about or want to use console.

Handled

  • lua assert failures

(I'll keep updating this list as I test/hit issues.)

morew4rd avatar Dec 09 '23 05:12 morew4rd

lyte.is_key_pressed/is_key_down/etc with invalid values also has this issue (ie: lyte.is_key_pressed("!") crashes)

Zorbn avatar Dec 26 '23 19:12 Zorbn

Syntax errors in code can show up like this:

image

In a sense there are handled that they're shown in the UI. But error message is not clear.

morew4rd avatar Dec 31 '23 16:12 morew4rd