🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

SDL error checking.

Started by
2 comments, last by thedevdan 19 years, 11 months ago
How much do you do it? Do you error check unrecoverable errors? If you error check each function, your code looks as bad as DX code.
Not giving is not stealing.
Advertisement
a lot of people jsut don't check for errors except for a few of the major functions.

Generally, things just work, so people get lazy about that sort of thing.
Quote: If you error check each function, your code looks as bad as DX code

not really, you just have to know what to check. SDL has the function SDL_GetError() which you can use to either trap errors or determine what they are.
Quote: Generally, things just work, so people get lazy about that sort of thing

pretty much. i'm not bashing sdl, but if something goes wrong a) its almost always obvious and b) its almost always simple c) its almost always your fault. since sdl has only a few basic data types that need to be messed with, the list of disasters waiting to happen is relatively short.
I think I'll just error check the most basic things, and throw an exception if there is an error. Thanks for your input.
Not giving is not stealing.

This topic is closed to new replies.

Advertisement