Advertisement

SDL error checking.

Started by July 25, 2004 04:41 PM
2 comments, last by thedevdan 20 years, 4 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.
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.
Advertisement
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