Namespaces
Variants
Views
Actions

Difference between revisions of "cpp/error/set unexpected"

From cppreference.com
< cpp‎ | error
(+)
 
m (Text replace - "{{cpp|" to "{{c|")
Line 8: Line 8:
 
{{ddcl list end}}
 
{{ddcl list end}}
  
Makes {{tt|f}} the new global {{cpp|std::unexpected_handler}} and returns the previously installed {{cpp|std::unexpected_handler}}.
+
Makes {{tt|f}} the new global {{c|std::unexpected_handler}} and returns the previously installed {{c|std::unexpected_handler}}.
  
 
===Parameters===
 
===Parameters===
 
{{param list begin}}
 
{{param list begin}}
{{param list item | f | pointer to function of type {{cpp|std::unexpected_handler}}, or null pointer}}
+
{{param list item | f | pointer to function of type {{c|std::unexpected_handler}}, or null pointer}}
 
{{param list end}}
 
{{param list end}}
  

Revision as of 18:56, 19 April 2012

Template:cpp/error/sidebar Template:ddcl list begin <tr class="t-dsc-header">

<td>
Defined in header <exception>
</td>

<td></td> <td></td> </tr> <tr class="t-dcl ">

<td class="t-dcl-nopad">
std::unexpected_handler set_unexpected( std::unexpected_handler f )
</td>

<td class="t-dcl-nopad"> </td> <td class="t-dcl-nopad"> </td> </tr> Template:ddcl list end

Makes f the new global std::unexpected_handler and returns the previously installed std::unexpected_handler.

Contents

Parameters

f - pointer to function of type std::unexpected_handler, or null pointer

Return value

The previously-installed unexpected handler, or a null pointer value if none was installed.

Exceptions

noexcept specification:  
noexcept
  

See also

Template:cpp/error/exception/dcl list unexpectedTemplate:cpp/error/exception/dcl list get unexpectedTemplate:cpp/error/exception/dcl list unexpected handler