Quote:Original post by FlowingOoze
I personally derive most of my exceptions from std::runtime_error, since it comes with a constructor that takes a string for what() (so i don't have to write it my self. Call me lazy. ;)
Hmm, so it does. My copies of The C++ Programming Language and The C++ Standard Library A Tutorial and Reference don't list std::runtime_error's interface! Why! [flaming]
EDIT: I just realized I forgot to get an answer for this:
Do you think the exception structs for classes like be placed within the class itself or just within the same namespace as the class? As in:
class Sprite{public: class SpriteException { //blah blah }; //blah blahprivate: //blah blah};
or
class SpriteException{ //blah blah};class Sprite{public: //blah blahprivate: //blah blah};
? I am leaning towards not sticking it within the actual class itself to reduce clutter. I don't really know though.
[Edited by - load_bitmap_file on June 22, 2005 1:41:11 PM]