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(); }
public CorExceptionEventArgs(CorAppDomain appdomain, CorException exception, int unhandled) : base(appdomain, "Exception") { Exception = exception; Unhandled = unhandled; }