I would accomplish this kind of thing by making the functions return bools. Suppose you have an init() function which allocates the memory, class the driver, etc. If at any point these actions are not completed then return false, otherwise all if good and return true.
Originally posted by mepaco
Thanks FillYourBrain. I know about try, catch, and throw but I guess thats not really what I want to know. I want my class to be friendly in terms of errors. Lets say that the people developing the GUI use my class to get some info about the CPU temp. My class tries to allocate dynamic memory, calls a function which calls a driver and then returns the info into the memory. Well, if there is an error in there what should I do. How much info should I give the GUI. Should I just describe the general error? Should I tell them that it was an error returned by the driver or is that too much info? I guess really I just need some good info on the concepts of error handling in a professional way.