My philosophy so far on this project has been "don't write shit down wrong," which has served us pretty well so far, but because of the wild goose chase that C++ errors are, maybe it's time to at least think about doing some actual run-time sanity checking to make catching these mistakes easier.
We'll need to come up with a standard for doing this. Some options:
Throw an exception - this is nice because it should trigger the debugger and give us a useful stack trace.
Use some kind of debug-only assert statement - this is nice because we don't pay the costs of it in release, though the "costs" of any other strategy will probably be negligible. It's also nice because it won't cause the screensaver to just randomly quit in release if there is a bug, but if we have a bug the screensaver is probably just going to crash anyway.
Log something to the console - probably the worst choice because it doesn't really do anything useful that a debugger doesn't already.
My philosophy so far on this project has been "don't write shit down wrong," which has served us pretty well so far, but because of the wild goose chase that C++ errors are, maybe it's time to at least think about doing some actual run-time sanity checking to make catching these mistakes easier.
We'll need to come up with a standard for doing this. Some options: