zoukankan      html  css  js  c++  java
  • 不能正常捕捉异常

    最近主工程切换到了MFC application, 发现在debug模式下不能edit and continous,在网上找了半天,才知道可以通过设置Debugger type 到Managed Only,恢复C#的edit and contious功能。

    新的问题来了:只要应用程序有任何未处理的异常,就直接crash,抛出系统错误框,如下图:

    untitled

    如果将Debugger type改回原来的Auto设置可以捕捉到异常,但确是如下的:

    EasyCapture1

    各位可知如何能够弹出如下的异常框:

    untitled2

    还有发现现在的CER 模块也不work了,是不是在MFC的环境下如下代码不起作用了:

    Application.ThreadException += new ThreadExceptionEventHandler(OnGuiUnhandledException);
    // For CLR unhandled exceptions
    Application.SetUnhandledExceptionMode(UnhandledExceptionMode.CatchException);
    AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(OnUnhandledException);

  • 相关阅读:
    Java 多线程概述
    Java 线程的创建和启动
    状态模式
    Spring 依赖注入
    Spring IOC
    在JavaEE中使用Mybatis框架
    Active Reports 补空白行
    SpreadForWin 清空Sheet
    日期格式转换
    Select Case 的实现
  • 原文地址:https://www.cnblogs.com/anders06/p/1257180.html
Copyright © 2011-2022 走看看