On 2004-12-18, David F. Newman <suppressed> wrote:
> I am connecting to a database in my setup() method and I am trying to
> handle errors. Apparently setup isn't evaled so I can't call die.
> Ideally I'd like my error run-mode called. So what's the best practice
> for dealing with errors that occur during setup?
You could eval{} your db connection call, and then use prerun_mode
to adjust what's displayed if it fails.
If your application is large, the prerun mode could be declared
in a super class, so it's available everywhere. In fact, the
prerun_mode you set could the same as your error mode.
Happy holidays.
Mark
--
http://mark.stosberg.com/
---------------------------------------------------------------------
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.