My MDI Project(VC++2010 Professional) is unable to catch errors ,though I return ,try catch block.
So I developed simple dialog based application .Placed one button on Dialog
and on its click written following code

Collapse | Copy Code
void CMFCExecDlg::OnBnClickedButton1()
{
try
{
int j = 0;
int i = 10/j;
}
catch(CException * e)
{
MessageBox(_T("Hello"),_T(""),MB_OK);
}
}

But still program control does not come in catch block it simply gives error.
I tried all child classes of CException but no use.I think there will be some setting in Visual Studio Please Help me for How to handle exceptions