std::errc
De cppreference.com
<metanoindex/>
<tbody> </tbody>| Definido no cabeçalho <system_error>
|
||
enum class errc; |
(desde C++11) | |
A enumeração
std::errc escopo define os valores das condições de erro portáteis que correspondem aos códigos de erro 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.
You can help to correct and verify the translation. Click here for instructions.
Constantes de membros
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
|
condição de erro correspondente ao código EAFNOSUPPORT POSIX
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
|
condição de erro correspondente ao código EADDRINUSE POSIX
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
|
condição de erro correspondente ao POSIX EADDRNOTAVAIL código
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
|
condição de erro correspondente ao código EISCONN POSIX
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
|
condição de erro correspondente ao código E2BIG POSIX
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
|
condição de erro correspondente ao código de EDOM POSIX
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
|
condição de erro correspondente ao código EFAULT POSIX
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
|
condição de erro correspondente ao código EBADF POSIX
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
|
condição de erro correspondente ao POSIX EBADMSG código
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
|
condição de erro correspondente ao código EPIPE POSIX
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
|
condição de erro correspondente ao código ECONNABORTED POSIX
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
|
condição de erro correspondente ao código EALREADY POSIX
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
|
condição de erro correspondente ao código ECONNREFUSED POSIX
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
|
condição de erro correspondente ao código ECONNRESET POSIX
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
|
condição de erro correspondente ao código EXDEV POSIX
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
|
condição de erro correspondente ao código EDESTADDRREQ POSIX
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
|
condição de erro correspondente ao código EBUSY POSIX
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
|
condição de erro correspondente ao código ENOTEMPTY POSIX
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
|
condição de erro correspondente ao código ENOEXEC POSIX
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
|
condição de erro correspondente ao POSIX EEXIST código
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
|
condição de erro correspondente ao código EFBIG POSIX
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
|
condição de erro correspondente ao código ENAMETOOLONG POSIX
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
|
uma condição de erro que corresponde ao código ENOSYS POSIX
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
|
condição de erro correspondente ao código EHOSTUNREACH POSIX
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
|
condição de erro correspondente ao código EIDRM POSIX
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
|
condição de erro correspondente ao código EILSEQ POSIX
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
|
condição de erro correspondente ao POSIX ENOTTY código
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
|
condição de erro correspondente ao código EINTR POSIX
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
|
condição de erro correspondente ao POSIX EINVAL código
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
|
condição de erro correspondente ao código ESPIPE POSIX
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
|
condição de erro correspondente ao código POSIX 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
|
condição de erro correspondente ao código EISDIR POSIX
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
|
condição de erro correspondente ao POSIX EMSGSIZE código
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
|
condição de erro correspondente ao POSIX ENETDOWN código
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
|
condição de erro correspondente ao código ENETRESET POSIX
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
|
condição de erro correspondente ao código ENETUNREACH POSIX
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
|
uma condição de erro que corresponde ao código ENOBUFS POSIX
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
|
condição de erro correspondente ao POSIX ECHILD código
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
|
condição de erro correspondente ao código ENOLINK POSIX
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
|
condição de erro correspondente ao código ENOLCK POSIX
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
|
condição de erro correspondente ao código ENODATA POSIX
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
|
condição de erro correspondente ao POSIX ENOMSG código
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
|
condição de erro correspondente ao código ENOPROTOOPT POSIX
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
|
condição de erro correspondente ao código ENOSPC POSIX
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
|
condição de erro correspondente ao código ENOSR POSIX
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
|
condição de erro correspondente ao código ENXIO POSIX
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
|
condição de erro correspondente ao código ENODEV POSIX
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
|
condição de erro correspondente ao POSIX ENOENT código
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
|
condição de erro correspondente ao código ESRCH POSIX
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
|
condição de erro correspondente ao código ENOTDIR POSIX
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
|
condição de erro correspondente ao código ENOTSOCK POSIX
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
|
condição de erro correspondente ao código ENOSTR POSIX
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
|
condição de erro correspondente ao código ENOTCONN POSIX
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
|
condição de erro correspondente ao código ENOMEM POSIX
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
|
condição de erro correspondente ao código ENOTSUP POSIX
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
|
condição de erro correspondente ao código ECANCELED POSIX
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
|
condição de erro correspondente ao POSIX EINPROGRESS código
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
|
condição de erro correspondente ao POSIX EPERM código
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
|
condição de erro correspondente ao código EOPNOTSUPP POSIX
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
|
condição de erro correspondente ao código EWOULDBLOCK POSIX
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
|
condição de erro correspondente ao código EOWNERDEAD POSIX
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
|
condição de erro correspondente ao código EACCES POSIX
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
|
condição de erro correspondente ao código EPROTO POSIX
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
|
condição de erro correspondente ao código EPROTONOSUPPORT POSIX
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
|
uma condição de erro que corresponde ao código EROFS POSIX
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
|
condição de erro correspondente ao código EDEADLK POSIX
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
|
condição de erro correspondente ao código EAGAIN POSIX
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
|
condição de erro correspondente ao código ERANGE POSIX
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
|
condição de erro correspondente ao código ENOTRECOVERABLE POSIX
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
|
condição de erro correspondente ao POSIX Etime código
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
|
condição de erro correspondente ao código ETXTBSY POSIX
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
|
condição de erro correspondente ao POSIX ETIMEDOUT código
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
|
condição de erro correspondente ao código ENFILE POSIX
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
|
condição de erro correspondente ao código EMFILE POSIX
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
|
condição de erro correspondente ao código EMLINK POSIX
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
|
condição de erro correspondente ao POSIX ELOOP código
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
|
uma condição de erro que corresponde ao código POSIX 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
|
condição de erro correspondente ao POSIX EPROTOTYPE código
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 auxiliares
estende a std::is_error_condition_enum traço tipo para identificar os valores da std::errc como condições de erro 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. (modelo de função) | |
Não-membros funções
(C++11) |
constrói um código de erro 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. (função) |
constrói uma condição de erro 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. (função) | |
Exemplo
#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';
}
}
Saída:
Caught a system_error
The error condition is std::errc::invalid_argument
the error description is Invalid argument
