http://bugzilla.novell.com/show_bug.cgi?id=497175


           Summary: Exceptions thrown in a method that is invoked via
                    Control.Invoke are not propagated to the caller
    Classification: Mono
           Product: Mono: Class Libraries
           Version: unspecified
          Platform: Other
        OS/Version: All
            Status: NEW
          Severity: Minor
          Priority: P5 - None
         Component: Windows.Forms
        AssignedTo: [email protected]
        ReportedBy: [email protected]
         QAContact: [email protected]
          Found By: Development


Description of Problem:
When Control.Invoke is used to invoke a method, if that method throws an
exception it does not get propagated back to the caller - rather an unhandled
exception occurs.  The Microsoft implementation does propagate this exception,
which can then be caught with in a try..catch block.

To fix this, AsyncMethodResult.EndInvoke should throw the exception (if any was
generated), and this will automatically fix Control.Invoke, and indeed any
handlers in async callbacks using Control.EndInvoke.

I've created a patch to introduce this functionality, but am unsure as to where
to post it for review.

Steps to reproduce the problem:
1. Create a method that throws an exception.
2. Call that method using Control.Invoke, and wrap it in a try..catch block


Actual Results:
An unhandled exception.

Expected Results:
A caught exception.

How often does this happen? 
Always.

-- 
Configure bugmail: http://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.
_______________________________________________
mono-bugs maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-bugs

Reply via email to