set_terminatefunction
<exception>
terminate_handler set_terminate (terminate_handler f) throw(); Set terminate handler function Sets f as the terminate handler function.A terminate handler function is a function automatically called when the exception handling process has to be abandoned for some reason. This happens when a handler cannot be found for a thrown exception, or for some other exceptional circumstance that makes impossible to continue the handling process. The terminate handler by default calls cstdlib's abort function. Parameters
Return valueThe current terminate handler function.terminate_handler is a function pointer type taking no parameters and returning void. Example
Possible output:
See also |
|
来自: WUCANADA > 《c plus plus》