Re: [Maypole] Maypole's error (mis)handling

From: Toby Corkindale (maypole at wintrmute.net)
Date: Thu Nov 25 2004 - 17:23:50 GMT


On Thu, Nov 25, 2004 at 05:07:10PM +0000, Simon Flack wrote:
> Toby Corkindale wrote:
> >If there is just one thing about Maypole that really makes it hard to work
> >with, it's the error handling - or lack thereof.
> >
> >When working with Maypole, I find it silently dropping errors, leaving me
> >staring at a Error 500 web page with no apparent cause.
> >As a result, I seem to be ending up back at the old "print lots of warn
> >messages" so I can see how far into a subroutine the code executed before
> >suffering from alien abduction and just... disappearing without a trace.
> >
> >Is there something I'm missing, which I could use to try and re-enable
> >error
> >reporting? There is nothing that I can find in the FAQs, although I have
> >noticed other people mentioning the problem via Google, albeit without a
> >fix.
>
> Does anything appear in your error logs?

No.. nothing whatsoever, except for some warns i was manually printing.

> You could also turn on debugging, either by defining &debug in your
> driver class:
>
> package MyApplication;
> use base 'CGI::Maypole';
> sub debug { 1 }

Ah, that at least seems to add some more info.. Wish it was in the FAQ..

This now gives me the helpful message of:
Warning: something's wrong at /usr/lib/perl5/site_perl/5.8.4/Maypole/View/Base.pm line 74.

This line in particular turns out to be:
sub error {
    my ( $self, $r ) = @_;
        warn $r->{error}; # <-- line 74

which in itself isn't actually that useful :(

Still, it's something to start going on.

tjc

-- 
Turning and turning in the widening gyre/The falcon cannot hear the falconer;
Things fall apart, the centre cannot hold/Mere anarchy is loosed upon the world
(gpg --keyserver www.co.uk.pgp.net --recv-key 897E5FF3)

_______________________________________________ maypole mailing list maypole at lists.netthink.co.uk http://lists.netthink.co.uk/listinfo/maypole



This archive was generated by hypermail 2.1.3 : Thu Feb 24 2005 - 22:25:57 GMT