exception handling
<pre><code>#include &lt;iostream&gt;  
using namespace std;  
#include &lt;exception&gt;  

void dis()
{
    cout&lt;&lt;"terminate disabled "&lt;&lt; endl;
}

void display() throw(int,double)    
{
    if(0)  
        throw int();  
    if(0)  
        throw double();  
    if(1)  
        throw string();  
}  

int main()  
{     
    set_unexpected(dis);  
    try  
    {  
        display();      
    }  
    catch(int)  
    {
        cout&lt;&lt;"int "&lt;&lt; endl;
    }  
    catch(double)  
    {
        cout&lt;&lt;"double "&lt;&lt; endl;
    }  
    catch(string)  
    {
        cout&lt;&lt;"string "&lt;&lt; endl;
    }  

    system("pause");  
    return 0;  
}      
</code></pre>

<p>now the output was</p>

<pre><code>terminate disabled
</code></pre>

<p>and then the program terminated</p>

<p>but instead of set_unexpected when i wrote</p>

<pre><code>set_terminate(dis);
</code></pre>

<p>the output was</p>

<pre><code>terminate disabled  
terminate disabled 
</code></pre>

<p>why this dicrepancy?</p>
