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 / Distributed Applications / March 2006

Tip: Looking for answers? Try searching our database.

Best Practices for Error Handling

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Max André Bündchen - 14 Mar 2006 13:47 GMT
I'm in may first smart client application and I'm using a web services structure to communicate the UI with the server.

I'm not sure about the best way to return errors to the client UI (for example, a invalid foreing key, a biz rule that was broke for
the user and so on). I could return via WS a error object like in a connectec system, but I think that is not a good way. Any
sugestion?

Thanks,

Max
Michael Nemtsev - 14 Mar 2006 21:52 GMT
Hello Max,

Use SoapException for this. General conception is here http://msdn2.microsoft.com/en-us/library/ds492xtk(VS.80).aspx
Throw like this http://msdn2.microsoft.com/en-us/library/6d0x301k.aspx and
catch like here http://msdn2.microsoft.com/en-us/library/7wteyzs5(VS.80).aspx

MB> I'm in may first smart client application and I'm using a web
MB> services structure to communicate the UI with the server.
MB>
MB> I'm not sure about the best way to return errors to the client UI
MB> (for example, a invalid foreing key, a biz rule that was broke for
MB> the user and so on). I could return via WS a error object like in a
MB> connectec system, but I think that is not a good way. Any sugestion?
MB>
MB> Thanks,
MB>
MB> Max
MB>
---
WBR,
Michael  Nemtsev :: blog: http://spaces.msn.com/laflour

"At times one remains faithful to a cause only because its opponents do not
cease to be insipid." (c) Friedrich Nietzsche
Richard Klee - 19 Mar 2006 23:54 GMT
I also suggest these two good articles, both dealing with exception handling
in distributed webservice scenario:

WebServices and Global Exception Handling:
http://www.hannes-pavelka.com/WebServicesAndGlobalExceptionHandling.aspx
SOA and Exception Handling:
http://blogs.geekdojo.net/ryan/archive/2004/02/10/942.aspx

> I'm in may first smart client application and I'm using a web services
> structure to communicate the UI with the server.
[quoted text clipped - 7 lines]
>
> Max

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.