[Koha-devel] Re: FAQ: Why am I prompted to save a .pl file? was: Problems adding a biblio...
Chris Cormack
crc at liblime.com
Wed Sep 12 02:11:42 CEST 2007
On 12/09/2007, at 11:51 AM, MJ Ray wrote:
> Rick Welykochy <rick at praxis.com.au> 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?
>
Ok by me, and I think it might need to be in each script, but i'm not
sure. Ill try it out and see :)
Mason has just suggested to me that we could do it with a syspref. So
you could turn it off if you wanted. (I know there is some school of
thought that exposing errors in the browser is a security risk).
> 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.
>
>
Yep, very good points
Chris
--
Chris Cormack chris.cormack at liblime.com
VP Research and Development www.liblime.com
LibLime +64 21 542 131
More information about the Koha-devel
mailing list