Library programs that don't return to the calling program
Posted: Fri Aug 07, 2009 9:54 am
Recently, I started a thread about error-handling routines in libraries. This is related:
I am putting more and more entire programs into libraries so they can be called from multiple places. Those programs either have built-in error-handling routines or else they call ANOTHER library to do that. Most of my error-handling routines have options to exit the program and chain back to the menu when an error can't be successfully handled any other way.
This is the scenario:
It's sure a lot easier to handle an error in a nested library by being able to ABORT back to the menu. But is there a downside?
-- Susan
I am putting more and more entire programs into libraries so they can be called from multiple places. Those programs either have built-in error-handling routines or else they call ANOTHER library to do that. Most of my error-handling routines have options to exit the program and chain back to the menu when an error can't be successfully handled any other way.
This is the scenario:
- a. I call a library (which may call another library, which calls another, etc.)
b. I get an error in one of those nested libraries
c. I chain directly out to a menu instead of retracing my steps backwards (via the FNEND which in my mind I equate to a RETURN in a GOSUB)
It's sure a lot easier to handle an error in a nested library by being able to ABORT back to the menu. But is there a downside?
-- Susan