Lets say I have a bunch of methods in a class which call a Webservice and, as a result, I need to check the "response" of the Webservice each time one of these methods is called.
But I don't want to do something like this:
MethodA() // non web service related method
MethodB() // Web service calling method
if _response == OK then
MethodC()
In essence I want to get the check without explicitly calling it.
So I would actually like to be doing something like this:
MethodA()
MethodB() //If this fails, don't continue
MethodC()
And I would bomb out of the calling sequence with the internal _response variable updated and execution stopping.
As I am typing I am thinking that each of the Methods would need to do the check themselves or at least call something which does this check before doing their thang.
Am I overcomplicating things here?
Thanks