I am considering the use of exceptions in my Game engine, But I have some problems with it. I know it can be a powerful tool for unexpected errors, but why should i wrap all my code in Try/Catches instead of using detailed return values. The win32 API uses HRESULTS to return specific error codes. Its a brute force way of giving feedback, but requires some sort of look up for error codes.
Are these my only options for returning a Failure/Success values?
I also looked into using a state machine for logging/Error checking. It would know what the last error was. unfortunately, this is not thread safe (Any state machine is not thread safe if it crosses thread boundaries, even with proper mutexing).
Any suggestions/comments are always appreciated. Also I apologize for possibly duplicating some posts, if this was talked about before.