std::exception
-
Wie erhalte ich denn die Fehlernummer von einer std::exception. Beim Erstellen kann ich ja im Konstruktor einen Text und eine Nummer mitgeben.
std::exception e("test", 5);
mit e.what() erhalte ich test. aber wie komme ich an die 5 ran?
-
Gar nicht.
Doku lesen:
http://msdn.microsoft.com/en-us/library/c4ts6d5a(VS.80).aspxRemarks
Specifically, this base class is the root of the standard exception classes defined in <stdexcept>. The C string value returned by what is left unspecified by the default constructor, but may be defined by the constructors for certain derived classes as an implementation-defined C string. None of the member functions throw any exceptions.The int parameter allows you to specify that no memory should be allocated. The value of the int is ignored.