std::unexpected_handler
Da cppreference.com
![]() |
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. |
Definido no cabeçalho <exception>
|
||
typedef void (*unexpected_handler)(); |
(obsoleta) | |
std::unexpected_handler
é o tipo de ponteiro de função (ponteiro para função que não recebe argumentos e retorna void), que está instalado e consultado pelas funções std::set_unexpected e std::get_unexpected e chamado por std::unexpected.Original:
std::unexpected_handler
is the function pointer type (pointer to function that takes no arguments and returns void), which is installed and queried by the functions std::set_unexpected and std::get_unexpected and 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.
You can help to correct and verify the translation. Click here for instructions.
A implementação C + + fornece um padrão
std::unexpected_handler
função, que exige std::terminate(). Se o valor do ponteiro nulo é instalado (por meio de std::set_terminate), a implementação pode restaurar o manipulador padrão em vez.Original:
The C++ implementation provides a default
std::unexpected_handler
function, which calls std::terminate(). If the null pointer value is installed (by means of std::set_terminate), the implementation may restore the default handler instead.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.
A
1) std::unexpected_handler
definido pelo usuário deverá pôr termo ao programa ou lançar uma exceção se ele lança uma exceção, uma das seguintes três situações podem ser encontradas:....Original:
A user-defined
std::unexpected_handler
is expected to either terminate the program or throw an exception. If it throws an exception, one of the following three situations may be encountered: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.
a exceção lançada pelo
2) std::unexpected_handler
satisfaz a especificação de exceção dinâmica que foi violada antes a nova exceção é permitido escapar da função e pilha desenrolar continua.Original:
the exception thrown by
std::unexpected_handler
satisfies the dynamic exception specification that was violated earlier. The new exception is allowed to escape the function and stack unwinding continues.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.
a exceção lançada pelo
std::unexpected_handler
ainda viola a especificação de exceção:...Original:
the exception thrown by
std::unexpected_handler
still violates the exception specification: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.
2a), no entanto, a especificação de exceção permite std::bad_exception: o objeto exceção lançada é destruído, e std::bad_exception é construído pelo C + + runtime e jogado em vez.
Original:
2a) however, the exception specification allows std::bad_exception: the thrown exception object is destroyed, and std::bad_exception is constructed by the C++ runtime and thrown instead.
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.
2b) a especificação de exceção não permite std::bad_exception: std::terminate() é chamado.
Original:
2b) the exception specification does not allow std::bad_exception: std::terminate() is called.
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.
[editar] Veja também
(obsoleta) |
função chamada quando especificação de exceção dinâmica é violada 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. (função) |
(obsoleta) |
alterações da função a ser chamado por std::unexpected 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. (função) |
(C++11)(obsoleta) |
obtém o unexpected_handler actual 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. (função) |