Error handling in wrapper classes...???
Hi there...
I am in the middle of creating a wrapper class for DirectX to make life easier. But i have a question about how i should do error handling.
Alright, lets say i have a class named CGfxScreen which i use for initializing DirectDraw and creating primary surfaces and so on...
Now, lets say i call CGfxScreen::fnInitialize() and DirectDrawCreateEx() fail. What should i do? Should i let the wrapper class handle the error and display it to the user, or should i return the HRESULT to the program that use the wrapper class, so that the program can take care of the error?
What would you do?
Thanks
-René
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement