◐ Shell
clean mode source ↗

std::unexpected_handler - cppreference.com

De cppreference.com

Esta página se ha traducido por ordenador/computador/computadora de la versión en inglés de la Wiki usando Google Translate.

La traducción puede contener errores y palabras aparatosas/incorrectas. Planea sobre el texto para ver la versión original. Puedes ayudar a corregir los errores y mejorar la traducción. Para instrucciones haz clic aquí.

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.

Ver también

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