Advertisement

Error handling in wrapper classes...???

Started by October 02, 2000 05:56 AM
0 comments, last by -XGathor- 24 years, 3 months ago
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é
Just have it throw an error, and the user can respond to that

This topic is closed to new replies.

Advertisement