Breymann. C++ Einführung und professionelle Programmierung

Breymann. C++ Einführung und professionelle Programmierung Breymann. C++ Einführung und professionelle Programmierung

vred.bioinf.uni.sb.de
von vred.bioinf.uni.sb.de Mehr von diesem Publisher
17.11.2014 Aufrufe

10.1.2 Exception-Hierarchie in C++ Die Basisklasse exception hat die folgende öffentliche Schnittstelle: namespace std { class exception { public: exception() throw(); exception(const exception&) throw(); exception& operator=(const exception&) throw(); virtual ~exception() throw(); virtual const char* what() const throw(); private: // ... }; } Davon leiten sich weitere ab, wie z.B. Breymann C++, c○ Hanser Verlag München Inhalt ◭◭ ◭ ◮ ◮◮ 414 zurück Ende

namespace std { } class logic_error : public exception { }; public: logic_error(const string& argument); Eigene Exception-Klassen sollten von den Exception-Klassen der Standardbibliothek abgeleitet werden. Breymann C++, c○ Hanser Verlag München Inhalt ◭◭ ◭ ◮ ◮◮ 415 zurück Ende

10.1.2 Exception-Hierarchie in <strong>C++</strong><br />

Die Basisklasse exception hat die folgende öffentliche Schnittstelle:<br />

namespace std {<br />

class exception {<br />

public:<br />

exception() throw();<br />

exception(const exception&) throw();<br />

exception& operator=(const exception&) throw();<br />

virtual ~exception() throw();<br />

virtual const char* what() const throw();<br />

private:<br />

// ...<br />

};<br />

}<br />

Davon leiten sich weitere ab, wie z.B.<br />

<strong>Breymann</strong> <strong>C++</strong>, c○ Hanser Verlag München<br />

Inhalt ◭◭ ◭ ◮ ◮◮ 414 zurück Ende

Hurra! Ihre Datei wurde hochgeladen und ist bereit für die Veröffentlichung.

Erfolgreich gespeichert!

Leider ist etwas schief gelaufen!