Error handling
Aus cppreference.com
< cpp
![]() |
This page has been machine-translated from the English version of the wiki using Google Translate.
The translation may contain errors and awkward wording. Hover over text to see the original version. You can help to fix errors and improve the translation. For instructions click here. |
[Bearbeiten] Exception Handling
Der Header
<exception>
bietet mehrere Klassen und Funktionen zur Ausnahmebehandlung in C + +-Programme .Original:
The header
<exception>
provides several classes and functions related to exception handling in C++ programs.The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
definiert in Header
<exception> | |
Basisklasse für Ausnahmen von den Standard-Library-Komponenten geworfen Original: base class for exceptions thrown by the standard library components The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (Klasse) | |
Original: Capture and storage of exception objects The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
prüft, ob Ausnahmebehandlung ist derzeit im Gange Original: checks if exception handling is currently in progress The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (Funktion) | |
(C++11) |
teilte Zeigertyp für den Umgang mit Exception-Objekte Original: shared pointer type for handling exception objects The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (typedef) |
(C++11) |
schafft eine std::exception_ptr von einer Ausnahme-Objekt Original: creates an std::exception_ptr from an exception object The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (Funktions-Template) |
(C++11) |
captures the current exception in a std::exception_ptr (Funktion) |
(C++11) |
wirft die Ausnahme von einem std::exception_ptr Original: throws the exception from an std::exception_ptr The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (Funktion) |
(C++11) |
a mixin Art zu erfassen und zu speichern aktuellen Ausnahmen Original: a mixin type to capture and store current exceptions The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (Klasse) |
(C++11) |
wirft seinen Streit mit std::nested_exception in Original: throws its argument with std::nested_exception mixed in The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (Funktions-Template) |
(C++11) |
wirft die Ausnahme von einer std::nested_exception Original: throws the exception from a std::nested_exception The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (Funktions-Template) |
Original: Handling of failures in exception handling The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
Funktion aufgerufen, wenn Ausnahmebehandlung ausfällt Original: function called when exception handling fails The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (Funktion) | |
der Typ der Funktion durch std::terminate genannt Original: the type of the function called by std::terminate The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (typedef) | |
(C++11) |
erhält die aktuelle terminate_handler Original: obtains the current terminate_handler The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (Funktion) |
wird die Funktion durch std::terminate aufgerufen werden Original: changes the function to be called by std::terminate The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (Funktion) | |
Original: Handling of exception specification violations The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
(veraltet) |
Funktion aufgerufen, wenn eine dynamische Exception-Spezifikation verletzt wird Original: function called when dynamic exception specification is violated The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (Funktion) |
Ausnahme ausgelöst, wenn eine dynamische Exception-Spezifikation verletzt wird, wenn möglich Original: exception thrown when dynamic exception specification is violated, if possible The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (Klasse) | |
(veraltet) |
der Typ der Funktion durch std::unexpected genannt Original: the type of the function called by std::unexpected The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (typedef) |
(C++11)(veraltet) |
erhält die aktuelle unexpected_handler Original: obtains the current unexpected_handler The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (Funktion) |
(veraltet) |
wird die Funktion durch std::unexpected aufgerufen werden Original: changes the function to be called by std::unexpected The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (Funktion) |
[Bearbeiten] Exception Kategorien
Mehrere Convenience-Klassen sind vordefiniert in der Kopfzeile
<stdexcept>
zu bestimmten Fehlerbedingungen berichten. Logik Fehler und Runtime Fehler: Diese Klassen können in zwei Kategorien eingeteilt werden. Logikfehler sind eine Folge von fehlerhaften Logik innerhalb des Programms und kann vermeidbar. Laufzeitfehler sind aufgrund von Ereignissen außerhalb des Geltungsbereichs des Programms und kann nicht einfach vorhergesagt werden .Original:
Several convenience classes are predefined in the header
<stdexcept>
to report particular error conditions. These classes can be divided into two categories: logic errors and runtime errors. Logic errors are a consequence of faulty logic within the program and may be preventable. Runtime errors are due to events beyond the scope of the program and can not be easily predicted.The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
definiert in Header
<stdexcept> | |
Exception-Klasse, um Verletzungen der logischen Voraussetzungen oder Klasseninvarianten anzuzeigen Original: exception class to indicate violations of logical preconditions or class invariants The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (Klasse) | |
Exception-Klasse, um ungültige Argumente berichten Original: exception class to report invalid arguments The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (Klasse) | |
Exception-Klasse, um Domain-Fehler zu melden Original: exception class to report domain errors The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (Klasse) | |
Exception-Klasse zu Versuchen, die maximal zulässige Größe überschritten berichten Original: exception class to report attempts to exceed maximum allowed size The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (Klasse) | |
Exception-Klasse, um Argumente außerhalb des erwarteten Bereichs berichten Original: exception class to report arguments outside of expected range The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (Klasse) | |
Exception-Klasse, um anzuzeigen Bedingungen nur nachweisbar Laufzeit Original: exception class to indicate conditions only detectable at run time The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (Klasse) | |
Exception-Klasse zu berichten Bereich Fehler im internen Berechnungen Original: exception class to report range errors in internal computations The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (Klasse) | |
Exception-Klasse, um arithmetische Überläufe zu berichten Original: exception class to report arithmetic overflows The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (Klasse) | |
Exception-Klasse, um arithmetische Underflows berichten Original: exception class to report arithmetic underflows The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (Klasse) |
[Bearbeiten] Fehlernummern
definiert in Header
<cerrno> | |
Makro, das auf POSIX-kompatiblen lokalen Thread-Fehler-Nummer variable
(Makro-Variablen) erweitert Original: macro which expands to POSIX-compatible thread-local error number variable (Makro-Variablen) The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. | |
Makros für Standard-POSIX-kompatiblen Fehlerbedingungen Original: macros for standard POSIX-compatible error conditions The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (Makro konstant) |
[Bearbeiten] Assertions
Assertions helfen, die Überprüfung der Voraussetzungen in Programme umzusetzen .
Original:
Assertions help to implement checking of preconditions in programs.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
statische Behauptung | führt Kompilierung assertion checking (seit C++11)
Original: performs compile-time assertion checking (seit C++11) The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
definiert in Header
<cassert> | |
bricht das Programm ab, wenn vom Benutzer angegebene Bedingung nicht true. Kann für Release-Builds deaktiviert zu sein Original: aborts the program if the user-specified condition is not true. May be disabled for release builds The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (funktionieren Makro) |
[Bearbeiten] Systemfehler
Der Header
<system_error>
definiert Typen und Funktionen verwendet, um Fehlerbedingungen, die aus dem Betriebssystem zu melden, Bäche I / O, std::future oder andere Low-Level-APIs .Original:
The header
<system_error>
defines types and functions used to report error conditions originating from the operating system, streams I/O, std::future, or other low-level APIs.The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
definiert in Header
<system_error> | |
(C++11) |
Basisklasse für Fehler Kategorien Original: base class for error categories The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (Klasse) |
(C++11) |
identifiziert die generische Fehler Kategorie Original: identifies the generic error category The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (Funktion) |
(C++11) |
identifiziert das Betriebssystem Fehler Kategorie Original: identifies the operating system error category The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (Funktion) |
(C++11) |
hält einen tragbaren Fehlercode Original: holds a portable error code The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (Klasse) |
(C++11) |
Die std::error_condition Aufzählung listet alle gängigen <cerrno> Makro-KonstantenOriginal: the std::error_condition enumeration listing all standard <cerrno> macro constantsThe text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (Klasse) |
(C++11) |
hält einen plattformabhängigen Fehlercode Original: holds a platform-dependent error code The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (Klasse) |
(C++11) |
Exception-Klasse verwendet, um Bedingungen, die eine error_code zu berichten Original: exception class used to report conditions that have an error_code The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (Klasse) |