N
Nimral
Hi folks,
is there a smart way to develop efficiently that helps me in the
following situation: a sub calls a subsub, which calls a subsubsub,
and so on.
Within a subsubsub an error occurs which I handle, either using on
error goto / err.number, or a try... catch block. I display a msgbox
(abort,retry,ignore). Implementing retry and ignore is fairly easy
using a loop structure. But how about "abort"?
First of all I do not, of course, want to terminate the whole
application using an end statement.
What I would want ist to continume execution somewhere near the end of
the sub where the chain of calls originated, do some cleanup work, and
then resume the main form routine of my program.
Cleanly terminating each sub until I reach the originating sub ist a
lot of clumsy code.
I have seen that try ... catch blocks come pretty close to what I have
in mind, but I haven't figured out yet wether I can simply use one by
willingly triggering the catched exception somewhere in a sub-sub (if
so ... how is this done), or wether there is another way to get what I
want.
Thanks,
Armin.
is there a smart way to develop efficiently that helps me in the
following situation: a sub calls a subsub, which calls a subsubsub,
and so on.
Within a subsubsub an error occurs which I handle, either using on
error goto / err.number, or a try... catch block. I display a msgbox
(abort,retry,ignore). Implementing retry and ignore is fairly easy
using a loop structure. But how about "abort"?
First of all I do not, of course, want to terminate the whole
application using an end statement.
What I would want ist to continume execution somewhere near the end of
the sub where the chain of calls originated, do some cleanup work, and
then resume the main form routine of my program.
Cleanly terminating each sub until I reach the originating sub ist a
lot of clumsy code.
I have seen that try ... catch blocks come pretty close to what I have
in mind, but I haven't figured out yet wether I can simply use one by
willingly triggering the catched exception somewhere in a sub-sub (if
so ... how is this done), or wether there is another way to get what I
want.
Thanks,
Armin.