Advertisement

Usefulness of <stdexcept> and <exception>?

Started by April 05, 2001 11:22 PM
1 comment, last by gimp 23 years, 10 months ago
I''m trying to integrate exception handling in to my application. I found that I was passing FILE_NOT_FOUND from CFile to CImage to CTexture to CModel loader etc, etc... Before handling occured. I had a look around and noticed that the standard libraries include some exception routines. They don''t look very useful though, something I could write in 1-2 mins. In fact I see no reason so far to have anything except a string in my base exception handler class. Am I missing something? Chris
Chris Brodie
Compact equals good. =) Really, it does.

The usefulness of these classes is that a lot of the standard routines in the C++ library already use them. If you use their exceptions in stdexcept, or derive your exceptions from std::exception, then you only have to have catch an "exception &x" to catch just about anything C++ can throw at you.
Advertisement
Ahhh... good point. Ok, I''ll use it too... Thanks
Chris Brodie

This topic is closed to new replies.

Advertisement