zoukankan      html  css  js  c++  java
  • unhandledException

    处理未捕获的异常是每个应用程序起码有的功能,C#在AppDomain提供了UnhandledException 事件来接收未捕获到的异常的通知。常见的应用如下:

    1 static void Main(string[] args)
    2 {
    3    AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException);
    4 }
    5 static void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e)
    6 {
    7    Exception error = (Exception)e.ExceptionObject;
    8    Console.WriteLine("MyHandler caught : " + error.Message);
    9 }
    世界上最可怕事情是比我们优秀的人比我们还努力
  • 相关阅读:
    HDU1007
    DFA
    netstat
    Sangfor
    JS 基础逻辑关系
    正则表达式
    JS中的DOM
    HTML、CSS、JS面试题
    JS作用域和作用域链
    JS String与正则表达式
  • 原文地址:https://www.cnblogs.com/AlexOneBlogs/p/7398438.html
Copyright © 2011-2022 走看看