std::unexpected_handler
Da cppreference.com.
![]() |
Questa pagina è stata tradotta in modo automatico dalla versione in ineglese della wiki usando Google Translate.
La traduzione potrebbe contenere errori e termini strani. Muovi il puntatore sopra al testo per vedere la versione originale. Puoi aiutarci a correggere gli gli errori. Per ulteriori istruzioni clicca qui. |
Elemento definito nell'header <exception>
|
||
typedef void (*unexpected_handler)(); |
(deprecato) | |
std::unexpected_handler
è il tipo di puntatore a funzione (puntatore a funzione che non accetta argomenti e restituisce void), che viene installato e interrogato dalle funzioni std::set_unexpected e std::get_unexpected e chiamato da 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.
Il C + + fornisce una implementazione di default funzione
std::unexpected_handler
, che chiama std::terminate(). Se il valore del puntatore nullo è installato (per mezzo di std::set_terminate), l'implementazione può ripristinare il gestore predefinito, invece.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
definito dall'utente si prevede di terminare il programma e per generare un'eccezione se viene generata un'eccezione, una delle seguenti tre situazioni si possono incontrare:....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.
l'eccezione generata da
2) std::unexpected_handler
soddisfa la specifica dinamica eccezione che è stato violato in precedenza la nuova eccezione è consentita per sfuggire alla funzione e impilare svolgimento 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.
l'eccezione generata da
std::unexpected_handler
viola ancora la specifica eccezione:...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), tuttavia, la specifica eccezione consente std::bad_exception: l'oggetto eccezione generata viene distrutto, e std::bad_exception è costruito dal runtime C + + e gettati invece.
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) la specifica eccezione non consente std::bad_exception: std::terminate() si chiama.
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.
[modifica] Vedi anche
(deprecato) |
funzione chiamata quando specifica eccezione dinamica è violata 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. (funzione) |
(deprecato) |
cambia la funzione di essere chiamato da 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. (funzione) |
(C++11)(deprecato) |
ottiene il unexpected_handler corrente 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. (funzione) |