Exemplo n.º 1
0
        private static void DisplayException(CorExceptionEventArgs ev)
        {
            Console.WriteLine("Display Exception:");
            ConsoleColor oldcolor = Console.ForegroundColor;

            Console.ForegroundColor = ConsoleColor.Red;

            CorException exception = ev.thread.CurrentException;

            Console.WriteLine("Name: " + exception.Name);
            Console.WriteLine("Type: " + (ev.unHandled == 0 ? "First Chance Exception": "Second Chance Exception"));

            Console.ForegroundColor = oldcolor;
            Console.WriteLine();
        }
Exemplo n.º 2
0
 public CorExceptionEventArgs(CorAppDomain appdomain, CorException exception, int unhandled)
     : base(appdomain, "Exception")
 {
     Exception = exception;
     Unhandled = unhandled;
 }