|
-
Oct 23rd, 2002, 07:25 AM
#1
Thread Starter
Lively Member
Exceptions with Web Services
I have a web service that I want to throw some custom exceptions (lets say MyCustomException) and have the client be able to catch the exception in a Try...Catch block.
But the problem is the Client does not have a reference to MyCustomException so as such I cannot catch it, is there anyway around this?
-
Oct 23rd, 2002, 07:32 AM
#2
yay gay
he can send a string saying "EXCEPTION"+MESSAGE and in the client u put a part that if says EXPCEPTION he will throw the exception..dont know if i explained well lol
-
Oct 23rd, 2002, 07:49 AM
#3
Thread Starter
Lively Member
Actually I have a MyCustomException class at the web service side that inherits from the ApplicationException class.
I'm doing a (on the web service):
if ('something that will be an error) then
Throw New MyCustomException("Some message')
end if
and on the client side i want to do a:
Try
'Whatever
Catch ex as MyCustomException
'do something here
Catch e as Exception
'do something here for something unexpected
End Try
i'm not sure if this is the way to do it. I'm new to this exception thingy
-
Oct 23rd, 2002, 08:24 AM
#4
Isn't the Exception class included with your Web service proxy class? I dont see why what you have shouldnt work if so.
Unless I dont quite understand what you mean.
-
Oct 23rd, 2002, 08:41 AM
#5
Thread Starter
Lively Member
that's wat i'm scratching my head over also. I tried to catch the custom exception but it's like the class is not even there although i used the full name of the class. Another class (not an exception) I can see.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|