D
darrel
Not quite sure how to word this.
I have a button click function that calls two different subs. One updates a
database, the other writes to a file.
Both of the subs have a try/catch within them. I'd like to have both of them
execute if they can, but if one can't, then have neither execute. Is there a
way to do this that isn't too complex? I assume I'd need to first call them
and have then run-through on a 'trial run' and if succeed, return a value.
If both are returned as 'doable' then call them both again for the actual
execution.
In this particular case, one is dependant on the other but not vice versa,
so I can simply call the first one, and then call the second one if the
first one executes. But, in the future, I could see wanting two separate
functions both being dependant on each other. Or is that bad design?
-Darrel
I have a button click function that calls two different subs. One updates a
database, the other writes to a file.
Both of the subs have a try/catch within them. I'd like to have both of them
execute if they can, but if one can't, then have neither execute. Is there a
way to do this that isn't too complex? I assume I'd need to first call them
and have then run-through on a 'trial run' and if succeed, return a value.
If both are returned as 'doable' then call them both again for the actual
execution.
In this particular case, one is dependant on the other but not vice versa,
so I can simply call the first one, and then call the second one if the
first one executes. But, in the future, I could see wanting two separate
functions both being dependant on each other. Or is that bad design?
-Darrel