CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    May 2007

    Question Unable to find setting for exception handling in MFC

    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()
    int j = 0;
    int i = 10/j;
    catch(CException * e)

    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

  2. #2
    GCDEF is offline Elite Member Power Poster
    Join Date
    Nov 2003

    Re: Unable to find setting for exception handling in MFC

    Does division by 0 throw an exception derived from CException?

Tags for this Thread

Posting Permissions

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

Windows Mobile Development Center

Click Here to Expand Forum to Full Width

On-Demand Webinars (sponsored)

We have made updates to our Privacy Policy to reflect the implementation of the General Data Protection Regulation.