What's a good way to abort normal processing and display a simple error
message?
For example, let's say I insert a row into a MySQL table and it fails. I
don't want to develop a lot of processing (beyond perhaps sleeping 5 seconds
and trying again) to accomodate this. I just want to display a general error
screen (to the effect that "a fatal error occured, please try again") and
accept that errors happen. I don't want my templates (and associated
processing) to have to consider whether a visitor is now in an error-state
and retrying. I think they can just back-arrow and try again.
These errors will happen in subroutines. I'd rather not return from them
with an error message and then have to make a decision, "do I load this
template or that template?" I'd like to simply emit a header and the
error-text from any subroutine that encounters such an unexpected error.
But, in CGI::Application, I think I must return to the run-mode method and
let it emit everything.
What I'd like to have is some way to abort the run-mode method, in
mid-stream, and let another one take over. Is there any way to do this?
Also, similar topic. I tried using prerun_mode() to set my start-mode. Log
messages began appearing in my server error-log saying the start_mode was
changed. Is there a way to tell it I expected the mode to change and
therefore don't want to see error-log entries about it?
Thanks,
Mark
---------------------------------------------------------------------
Web Archive: http://www.mail-archive.com/suppressed/
http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2
To unsubscribe, e-mail: suppressed
For additional commands, e-mail: suppressed
Mail converted by mhonarc 2.6.15
This archive provided courtesy of JSW4.NET, Internet Hosting Services for Small Business.