[ Web Proxy ]
URL:
Viewing: https://fr.cppreference.com/cpp/error/system_error [Back]  [Original]

std::system_error cppreference.com
cppreference.com
Espaces de noms
Variantes

std::system_error

De cppreference.com

<metanoindex/>

 
 
 
Erreur de manipulation
La gestion des exceptions
Original:
Exception handling
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
exception
uncaught_exception
exception_ptr (C++11)
make_exception_ptr (C++11)
current_exception (C++11)
rethrow_exception (C++11)
nested_exception (C++11)
throw_with_nested (C++11)
rethrow_if_nested (C++11)
Dfaillances de gestion des exceptions
Original:
Exception handling failures
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
terminate
terminate_handler
get_terminate (C++11)
set_terminate
unexpected (obsolte)
bad_exception
unexpected_handler (obsolte)
get_unexpected (C++11) (obsolte)
set_unexpected (obsolte)
Catgories d'exception
Original:
Exception categories
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
logic_error
invalid_argument
domain_error
length_error
out_of_range
runtime_error
range_error
overflow_error
underflow_error
Les codes d'erreur
Original:
Error codes
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Les codes d'erreur
errno
Les assertions
Original:
Assertions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
assert
system_error installation
Original:
system_error facility
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
error_category (C++11)
generic_category (C++11)
system_category (C++11)
error_condition (C++11)
errc (C++11)
error_code (C++11)
system_error (C++11)
 
<tbody> </tbody>
Dclar dans l'en-tte <system_error>
class system_error;
(depuis C++11)
std::system_error est le type de l'exception leve par plusieurs fonctions de bibliothques (gnralement les fonctions d'interface avec le systme d'exploitation des installations, par exemple le constructeur de std::thread), lorsque l'exception a un std::error_code associ qui doit tre signal .
Original:
std::system_error is the type of the exception thrown by various library functions (typically the functions that interface with the OS facilities, e.g. the constructor of std::thread), when the exception has an associated std::error_code which needs to be reported.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

Fonctions membres

construit l'objet system_error
Original:
constructs the system_error object
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(fonction membre publique) [edit]
renvoie le code d'erreur
Original:
returns error code
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(fonction membre publique) [edit]
[
virtuel
Original:
virtual
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
]
renvoie une chane explicative
Original:
returns explanatory string
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(function membre virtuelle publique) [edit]

Inherited from std::exception

Member functions

[
virtuel
Original:
virtual
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
]
Dtruit l'objet exception
Original:
destructs the exception object
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(function membre virtuelle publique de std::exception) [edit]
[
virtuel
Original:
virtual
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
]
retourne une chane explicative
Original:
returns an explanatory string
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(function membre virtuelle publique de std::exception) [edit]

Exemple

#include <thread>
#include <iostream>
#include <system_error>

int main()
{
    try {
        std::thread().detach(); // attempt to detach a non-thread
    } catch(const std::system_error& e) {
        std::cout << "Caught system_error with code " << e.code() 
                  << " meaning " << e.what() << '\n';
    }
}

Rsultat :

Caught system_error with code generic:22 meaning Invalid argument

Web Proxy Viewer  |  New URL  |  Original Page