Espacios de nombres
Variantes
Acciones

std::unexpected_handler

De cppreference.com
< cpp‎ | error
 
 
Biblioteca de servicios
 
Control de errores
Control de excepciones
Fallas del control de excepciones
(hasta C++17)
unexpected_handler
(hasta C++17)
(C++11)(hasta C++17)
(hasta C++17)
Códigos de error
Códigos de error
 
Definido en el archivo de encabezado <exception>
typedef void (*unexpected_handler)();
(en desuso)
std::unexpected_handler es el tipo de puntero de función (puntero a una función que no tiene argumentos y devuelve void), que se instala y se preguntó por las funciones std::set_unexpected y std::get_unexpected y llamado 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.
La implementación en C + + proporciona una función predeterminada std::unexpected_handler, que llama std::terminate(). Si el valor de puntero nulo se instala (por medio de std::set_terminate), la aplicación puede restaurar el controlador predeterminado en lugar .
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.
A std::unexpected_handler definido por el usuario que se espera de terminar el programa o una excepción si se produce una excepción, una de las tres situaciones siguientes se pueden encontrar:....
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.
1)
la excepción lanzada por std::unexpected_handler satisface la especificación de excepciones dinámica que se violó antes La nueva excepción se deja escapar la función y el desenredo de pila sigue .
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.
2)
la excepción lanzada por std::unexpected_handler aún viola la especificación de excepciones:...
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.
2a), sin embargo, la especificación de excepción permite std::bad_exception: el objeto excepción que se destruye, y std::bad_exception es construido por el C + + tiempo de ejecución y arrojado en lugar .
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.
2b) la especificación de la excepción no permite std::bad_exception: std::terminate() se llama .
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.

[editar] Ver también

(en desuso)
Función llamada cuando la especificación de excepciones dinámica es violada.
(función) [editar]
(en desuso)
Cambia la función a ser llamada por std::unexpected.
(función) [editar]
(C++11)(en desuso)
Obtiene el controlador no esperado (unexpected_handler) actual.
(función) [editar]