[Mono-bugs] [Bug 435127] New: Assembly.UnhandledException does not work

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Tue Oct 14 05:42:05 EDT 2008


https://bugzilla.novell.com/show_bug.cgi?id=435127


           Summary: Assembly.UnhandledException does not work
           Product: Mono: Class Libraries
           Version: SVN
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: CORLIB
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: alan.mcgovern at gmail.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---


class MainClass
        {
                public static void Main(string[] args)
                {
                        AppDomain.CurrentDomain.UnhandledException += delegate
{ Console.WriteLine("AAAAAGGGHHH I DIED"); };
                        System.Threading.ThreadPool.QueueUserWorkItem (delegate
{
                                Console.WriteLine("Throwing");
                                throw new Exception("HAH"); }
                        );
                        System.Threading.Thread.Sleep(1000);
                        Console.WriteLine("Done");
                        Console.WriteLine("Throwing an exception in the main
thread");
                        throw new Exception();
                }
        }

Expected output:
Throwing
AAAAAGGGHHH I DIED

Actual output:
Throwing
Done
Throwing an exception in the main thread
AAAAAGGGHHH I DIED


-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the mono-bugs mailing list