koha-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Koha-devel] Re: FAQ: Why am I prompted to save a .pl file? was: Problem


From: MJ Ray
Subject: [Koha-devel] Re: FAQ: Why am I prompted to save a .pl file? was: Problems adding a biblio...
Date: Wed, 12 Sep 2007 00:51:11 +0100
User-agent: Heirloom mailx 12.2 01/07/07

Rick Welykochy <address@hidden> wrote: [...]
> To stop this problem once and for all from ever occurring again,
> catch all errors. To catch all errors and thus produce the correct
> headers for EVERY Koha script, use exception handling. Works a treat :)

What we should do is make the errors prettier.  We should probably use
CGI::Carp qw(fatalsToBrowser); - is that OK by everyone and do we need
this only in C4::Output or in all cgi-bin scripts?

I don't think exceptions are the way to go.  Read the top of perl's
exceptions library:
[...]
# This library is no longer being maintained, and is included for backward
# compatibility with Perl 4 programs which may require it.
#
# In particular, this should not be used as an example of modern Perl
# programming techniques.
[...]

Also, we're never going to catch all errors.  Sysadmins and users
sometimes do surprising things, like transposing fields in the
configuration, or installing new firewalls.

Thanks,
-- 
MJ Ray - see/vidu http://mjr.towers.org.uk/email.html
Experienced webmaster-developers for hire http://www.ttllp.co.uk/
Also: statistician, sysadmin, online shop builder, workers co-op.
Writing on koha, debian, sat TV, Kewstoke http://mjr.towers.org.uk/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]