+ Reply to Thread
Results 1 to 2 of 2

Thread: What is set_unexpected?

  1. #1

    What is set_unexpected?

    What is set_unexpected? How to use it?

  2. #2
    Senior Member
    Join Date
    Feb 2012
    Posts
    109
    set_unexpected is a handler that can be set on program execution.

    When anyone throws an exception and there is no exception-specification in that context then installed handler for set_unexpected is being called.

    Example:

    Code:
    void UnexpectedOccur()
    {
    	throw 42 ;
    }
    
    int main ()
    {
         set_unexpected(UnexpectedOccur) ;
    }
    For more detail: http://www.cplusplus.com/reference/s...et_unexpected/

+ Reply to Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts