◐ Shell
clean mode source ↗

std::errc — cppreference.com

<metanoindex/>

<tbody> </tbody>

Déclaré dans l'en-tête

<system_error>

enum class errc;

(depuis C++11)

L'énumération std::errc portée définit les valeurs des conditions d'erreur mobiles qui correspondent aux codes d'erreur POSIX .

Original:

The scoped enumeration std::errc defines the values of portable error conditions that correspond to the POSIX error codes.

The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

Constantes membres

Constante

Original:

Constant

The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

Explanation
address_family_not_supported

condition d'erreur correspondant à POSIX Code EAFNOSUPPORT

Original:

error condition corresponding to POSIX code EAFNOSUPPORT

The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

address_in_use

condition d'erreur correspondant à POSIX Code EADDRINUSE

Original:

error condition corresponding to POSIX code EADDRINUSE

The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

address_not_available

condition d'erreur correspondant à POSIX Code EADDRNOTAVAIL

Original:

error condition corresponding to POSIX code EADDRNOTAVAIL

The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

already_connected

condition d'erreur correspondant à POSIX Code EISCONN

Original:

error condition corresponding to POSIX code EISCONN

The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

argument_list_too_long

condition d'erreur correspondant à POSIX Code E2BIG

Original:

error condition corresponding to POSIX code E2BIG

The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

argument_out_of_domain

condition d'erreur correspondant à POSIX Code EDOM

Original:

error condition corresponding to POSIX code EDOM

The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

bad_address

condition d'erreur correspondant à POSIX Code EFAULT

Original:

error condition corresponding to POSIX code EFAULT

The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

bad_file_descriptor

condition d'erreur correspondant à POSIX Code EBADF

Original:

error condition corresponding to POSIX code EBADF

The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

bad_message

condition d'erreur correspondant à POSIX Code EBADMSG

Original:

error condition corresponding to POSIX code EBADMSG

The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

broken_pipe

condition d'erreur correspondant à POSIX Code EPIPE

Original:

error condition corresponding to POSIX code EPIPE

The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

connection_aborted

condition d'erreur correspondant à POSIX Code ECONNABORTED

Original:

error condition corresponding to POSIX code ECONNABORTED

The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

connection_already_in_progress

condition d'erreur correspondant à POSIX Code EALREADY

Original:

error condition corresponding to POSIX code EALREADY

The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

connection_refused

condition d'erreur correspondant à POSIX Code ECONNREFUSED

Original:

error condition corresponding to POSIX code ECONNREFUSED

The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

connection_reset

condition d'erreur correspondant à POSIX Code ECONNRESET

Original:

error condition corresponding to POSIX code ECONNRESET

The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

cross_device_link

condition d'erreur correspondant à POSIX Code EXDEV

Original:

error condition corresponding to POSIX code EXDEV

The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

destination_address_required

condition d'erreur correspondant à POSIX Code EDESTADDRREQ

Original:

error condition corresponding to POSIX code EDESTADDRREQ

The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

device_or_resource_busy

condition d'erreur correspondant à POSIX Code EBUSY

Original:

error condition corresponding to POSIX code EBUSY

The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

directory_not_empty

condition d'erreur correspondant à POSIX Code ENOTEMPTY

Original:

error condition corresponding to POSIX code ENOTEMPTY

The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

executable_format_error

condition d'erreur correspondant à POSIX Code ENOEXEC

Original:

error condition corresponding to POSIX code ENOEXEC

The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

file_exists

condition d'erreur correspondant à POSIX Code EEXIST

Original:

error condition corresponding to POSIX code EEXIST

The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

file_too_large

condition d'erreur correspondant à POSIX Code EFBIG

Original:

error condition corresponding to POSIX code EFBIG

The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

filename_too_long

condition d'erreur correspondant à POSIX Code ENAMETOOLONG

Original:

error condition corresponding to POSIX code ENAMETOOLONG

The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

function_not_supported

condition d'erreur correspondant à POSIX ENOSYS code

Original:

error condition corresponding to POSIX code ENOSYS

The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

host_unreachable

condition d'erreur correspondant à POSIX Code EHOSTUNREACH

Original:

error condition corresponding to POSIX code EHOSTUNREACH

The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

identifier_removed

condition d'erreur correspondant à POSIX Code EIDRM

Original:

error condition corresponding to POSIX code EIDRM

The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

illegal_byte_sequence

condition d'erreur correspondant à POSIX Code EILSEQ

Original:

error condition corresponding to POSIX code EILSEQ

The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

inappropriate_io_control_operation

condition d'erreur correspondant à POSIX Code ENOTTY

Original:

error condition corresponding to POSIX code ENOTTY

The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

interrupted

condition d'erreur correspondant à POSIX Code EINTR

Original:

error condition corresponding to POSIX code EINTR

The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

invalid_argument

condition d'erreur correspondant à POSIX EINVAL code

Original:

error condition corresponding to POSIX code EINVAL

The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

invalid_seek

condition d'erreur correspondant à POSIX Code ESPIPE

Original:

error condition corresponding to POSIX code ESPIPE

The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

io_error

condition d'erreur correspondant à POSIX Code EIO

Original:

error condition corresponding to POSIX code EIO

The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

is_a_directory

condition d'erreur correspondant à POSIX Code EISDIR

Original:

error condition corresponding to POSIX code EISDIR

The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

message_size

condition d'erreur correspondant à POSIX Code EMSGSIZE

Original:

error condition corresponding to POSIX code EMSGSIZE

The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

network_down

condition d'erreur correspondant à POSIX Code ENETDOWN

Original:

error condition corresponding to POSIX code ENETDOWN

The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

network_reset

condition d'erreur correspondant à POSIX Code ENETRESET

Original:

error condition corresponding to POSIX code ENETRESET

The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

network_unreachable

condition d'erreur correspondant à POSIX Code ENETUNREACH

Original:

error condition corresponding to POSIX code ENETUNREACH

The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

no_buffer_space

condition d'erreur correspondant à POSIX ENOBUFS code

Original:

error condition corresponding to POSIX code ENOBUFS

The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

no_child_process

condition d'erreur correspondant à POSIX Code ECHILD

Original:

error condition corresponding to POSIX code ECHILD

The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

no_link

condition d'erreur correspondant à POSIX Code ENOLINK

Original:

error condition corresponding to POSIX code ENOLINK

The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

no_lock_available

condition d'erreur correspondant à POSIX Code ENOLCK

Original:

error condition corresponding to POSIX code ENOLCK

The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

no_message_available

condition d'erreur correspondant à POSIX Code ENODATA

Original:

error condition corresponding to POSIX code ENODATA

The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

no_message

condition d'erreur correspondant à POSIX Code ENOMSG

Original:

error condition corresponding to POSIX code ENOMSG

The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

no_protocol_option

condition d'erreur correspondant à POSIX Code ENOPROTOOPT

Original:

error condition corresponding to POSIX code ENOPROTOOPT

The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

no_space_on_device

condition d'erreur correspondant à POSIX Code ENOSPC

Original:

error condition corresponding to POSIX code ENOSPC

The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

no_stream_resources

condition d'erreur correspondant à POSIX Code ENOSR

Original:

error condition corresponding to POSIX code ENOSR

The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

no_such_device_or_address

condition d'erreur correspondant à POSIX Code ENXIO

Original:

error condition corresponding to POSIX code ENXIO

The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

no_such_device

condition d'erreur correspondant à POSIX Code ENODEV

Original:

error condition corresponding to POSIX code ENODEV

The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

no_such_file_or_directory

condition d'erreur correspondant à POSIX Code ENOENT

Original:

error condition corresponding to POSIX code ENOENT

The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

no_such_process

condition d'erreur correspondant à POSIX Code ESRCH

Original:

error condition corresponding to POSIX code ESRCH

The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

not_a_directory

condition d'erreur correspondant à POSIX Code ENOTDIR

Original:

error condition corresponding to POSIX code ENOTDIR

The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

not_a_socket

condition d'erreur correspondant à POSIX Code ENOTSOCK

Original:

error condition corresponding to POSIX code ENOTSOCK

The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

not_a_stream

condition d'erreur correspondant à POSIX Code ENOSTR

Original:

error condition corresponding to POSIX code ENOSTR

The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

not_connected

condition d'erreur correspondant à POSIX Code ENOTCONN

Original:

error condition corresponding to POSIX code ENOTCONN

The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

not_enough_memory

condition d'erreur correspondant à POSIX Code ENOMEM

Original:

error condition corresponding to POSIX code ENOMEM

The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

not_supported

condition d'erreur correspondant à POSIX Code ENOTSUP

Original:

error condition corresponding to POSIX code ENOTSUP

The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

operation_canceled

condition d'erreur correspondant à POSIX Code ECANCELED

Original:

error condition corresponding to POSIX code ECANCELED

The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

operation_in_progress

condition d'erreur correspondant à POSIX Code EINPROGRESS

Original:

error condition corresponding to POSIX code EINPROGRESS

The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

operation_not_permitted

condition d'erreur correspondant à POSIX Code EPERM

Original:

error condition corresponding to POSIX code EPERM

The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

operation_not_supported

condition d'erreur correspondant à POSIX Code EOPNOTSUPP

Original:

error condition corresponding to POSIX code EOPNOTSUPP

The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

operation_would_block

condition d'erreur correspondant à POSIX Code EWOULDBLOCK

Original:

error condition corresponding to POSIX code EWOULDBLOCK

The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

owner_dead

condition d'erreur correspondant à POSIX Code EOWNERDEAD

Original:

error condition corresponding to POSIX code EOWNERDEAD

The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

permission_denied

condition d'erreur correspondant à POSIX EACCES code

Original:

error condition corresponding to POSIX code EACCES

The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

protocol_error

condition d'erreur correspondant à POSIX Code EPROTO

Original:

error condition corresponding to POSIX code EPROTO

The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

protocol_not_supported

condition d'erreur correspondant à POSIX Code EPROTONOSUPPORT

Original:

error condition corresponding to POSIX code EPROTONOSUPPORT

The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

read_only_file_system

condition d'erreur correspondant à POSIX EROFS code

Original:

error condition corresponding to POSIX code EROFS

The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

resource_deadlock_would_occur

condition d'erreur correspondant à POSIX Code EDEADLK

Original:

error condition corresponding to POSIX code EDEADLK

The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

resource_unavailable_try_again

condition d'erreur correspondant à POSIX Code EAGAIN

Original:

error condition corresponding to POSIX code EAGAIN

The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

result_out_of_range

condition d'erreur correspondant à POSIX Code ERANGE

Original:

error condition corresponding to POSIX code ERANGE

The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

state_not_recoverable

condition d'erreur correspondant à POSIX Code ENOTRECOVERABLE

Original:

error condition corresponding to POSIX code ENOTRECOVERABLE

The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

stream_timeout

condition d'erreur correspondant à POSIX Code Etime

Original:

error condition corresponding to POSIX code ETIME

The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

text_file_busy

condition d'erreur correspondant à POSIX Code ETXTBSY

Original:

error condition corresponding to POSIX code ETXTBSY

The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

timed_out

condition d'erreur correspondant à POSIX Code ETIMEDOUT

Original:

error condition corresponding to POSIX code ETIMEDOUT

The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

too_many_files_open_in_system

condition d'erreur correspondant à POSIX Code ENFILE

Original:

error condition corresponding to POSIX code ENFILE

The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

too_many_files_open

condition d'erreur correspondant à POSIX Code EMFILE

Original:

error condition corresponding to POSIX code EMFILE

The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

too_many_links

condition d'erreur correspondant à POSIX Code EMLINK

Original:

error condition corresponding to POSIX code EMLINK

The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

too_many_symbolic_link_levels

condition d'erreur correspondant à POSIX Code ELOOP

Original:

error condition corresponding to POSIX code ELOOP

The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

value_too_large

condition d'erreur correspondant à POSIX Code EOVERFLOW

Original:

error condition corresponding to POSIX code EOVERFLOW

The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

wrong_protocol_type

condition d'erreur correspondant à POSIX Code EPROTOTYPE

Original:

error condition corresponding to POSIX code EPROTOTYPE

The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

Classes d'aide

prolonge le trait std::is_error_condition_enum Type d'identifier les valeurs de l'std::errc que les conditions d'erreur

Original:

extends the type trait std::is_error_condition_enum to identify the the std::errc values as error conditions

The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.


(fonction générique)

Fonctions annexes

construit un code d'erreur std::errc

Original:

constructs an std::errc 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)

construit une condition d'erreur std::errc

Original:

constructs an std::errc error condition

The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.


(fonction)

Exemple

#include <iostream>
#include <system_error>
#include <thread>
int main()
{
    try {
        std::thread().detach(); // detaching a not-a-thread
    } catch (const std::system_error& e) {
        std::cout << "Caught a system_error\n";
        if(e.code() == std::errc::invalid_argument)
            std::cout << "The error condition is std::errc::invalid_argument\n";
        std::cout << "the error description is " << e.what() << '\n';
    }
}

Résultat :

Caught a system_error
The error condition is std::errc::invalid_argument
the error description is Invalid argument

Voir aussi

détient un code d'erreur dépendant de la plate-forme

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.


(classe) [edit]

détient un code d'erreur portable

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.


(classe) [edit]