What I noticed now. Definition of exception in the standard (18.6.1):
class exception { public : exception() throw(); exception(const exception &) throw(); exception& operator=(const exception&) throw(); virtual ~exception() throw(); virtual const char* what() const throw(); };
Definition of exception on MSDN :
class exception { public: exception(); exception(const char *const&); exception(const char *const&, int); exception(const exception&); exception& operator=(const exception&); virtual ~exception(); virtual const char *what() const; };
It seems that the Microsoft version allows you to specify an error message for the exception object, while the standard version allows you to do this only for derived classes (but does not prevent you from creating a general exception with the message undefined).
I know this is pretty slight, but still. Is there a good reason for this?
c ++ standards visual-c ++
suszterpatt Mar 01 '11 at 16:20 2011-03-01 16:20
source share