hsSDL2 icon indicating copy to clipboard operation
hsSDL2 copied to clipboard

Make sure calls to 'error' also call 'SDL_GetError'

Open ocharles opened this issue 11 years ago • 1 comments

Calls such as error "Failed to create rendering context" could be improved by saying why.

ocharles avatar Jan 03 '14 09:01 ocharles

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.

osa1 avatar Jan 03 '14 11:01 osa1