Usefulness of <stdexcept> and <exception>?
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.
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.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement