Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / CLR / February 2004

Tip: Looking for answers? Try searching our database.

asynchronous delegate problem

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Sankar Nemani - 17 Feb 2004 22:53 GMT
I have a delegate which I call BeginInvoke on. I use the waithandle.WaitOne
to wait for the delegate to finish.
If there is an exception in the delegate call, waithandle.WaitOne returns
true and the asyncresult.IsFinished(Completed) also returns true.
How do I know if there is an exception and the call was completed but with
an exception?
John Conwell - 18 Feb 2004 00:46 GMT
wrap the call to the web service's EndXxxx() method in a try catch, and catch for a soap exception.  The exception wont be returned until you actually call the End method.  Also, if you dont call the End method, you'll never know that an exception occurred
   
    ----- Sankar Nemani wrote: -----
   
    I have a delegate which I call BeginInvoke on. I use the waithandle.WaitOne
    to wait for the delegate to finish.
    If there is an exception in the delegate call, waithandle.WaitOne returns
    true and the asyncresult.IsFinished(Completed) also returns true.
    How do I know if there is an exception and the call was completed but with
    an exception?
Rakesh Khanduja - 18 Feb 2004 06:26 GMT
Use Exception handling with try and catch block if a exception arisees in the try block when u use the delegates or function pointers is catched in catch block
   
    ----- Sankar Nemani wrote: ----
   
    I have a delegate which I call BeginInvoke on. I use the waithandle.WaitOn
    to wait for the delegate to finish
    If there is an exception in the delegate call, waithandle.WaitOne return
    true and the asyncresult.IsFinished(Completed) also returns true
    How do I know if there is an exception and the call was completed but wit
    an exception

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.