To Avoid this we can provide our own Termination Handler function like:
terminate_handler set_terminate( term_function );
This can be done any where in the code . BEFORE EXCEPTION IS THROWN.
Also only one Function can be registered for as Handler
_uncaught_handler
Multiple calls of set_terminate() overwrites previous value.
OUTPUT :
terminate called after throwing an instance of 'char const*'
Aborted
Note : set_terminate is after exception is thrown.
OUTPUT:
Second Handler was called by terminate
Note :first handler is overwritten
Great programming. Thanks for sharing, keep updating
ReplyDeletec++ interview questions
salesforce interview questions
bootstrap interview questions
spring interview questions and answers for experienced
Thanks for provide great informatic and looking beautiful blog
ReplyDeletepython training in bangalore | python online Training
artificial intelligence training in bangalore | artificial intelligence online training
machine learning training in bangalore | machine learning online training
uipath-training-in-bangalore | uipath online training
blockchain training in bangalore | blockchain online training
aws training in Bangalore | aws online training
data science training in bangalore | data science online training
hadoop training in bangalore | hadoop online training
iot training in bangalore | iot online training