hsSDL2
hsSDL2 copied to clipboard
Make sure calls to 'error' also call 'SDL_GetError'
Calls such as error "Failed to create rendering context"
could be improved by saying why.
In my fork I'm also trying to improve that. I'm using these two functions for error reporting: https://github.com/osa1/hsSDL2/blob/master/Graphics/UI/SDL/General.hsc#L222
An example use: https://github.com/osa1/hsSDL2/blob/master/Graphics/UI/SDL/Render.hsc#L125
Later we can change handleError
and handleErrorI
and provide user to specify an error handler so that he/she can show errors in a window, for example.
I still have a few undefined
parts in my work and after fixing those I'll submit a pull request.