Skip Menu |
 

This queue is for tickets about the CGI-Application CPAN distribution.

Report information
The Basics
Id: 75205
Status: open
Priority: 0/
Queue: CGI-Application

People
Owner: Nobody in particular
Requestors: RSAVAGE [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 4.50
Fixed in: (no value)



Subject: Error mode method call not protected by eval
MIME-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Disposition: inline
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 158
Download (untitled) / with headers
text/plain 158b
Hi Folks In Application.pm V 4.50 line line 149 I think the call: $body = $self->$em( $error ); should be protected by an eval, or even better, Try::Tiny.
MIME-Version: 1.0
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Disposition: inline
Content-Type: text/plain; charset="UTF-8"
Message-ID: <rt-3.8.HEAD-10809-1330352496-428.75205-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 792
Download (untitled) / with headers
text/plain 792b
On Tue Feb 21 23:08:07 2012, RSAVAGE wrote: Show quoted text
> Hi Folks > > In Application.pm V 4.50 line line 149 I think the call: > > $body = $self->$em( $error );
When the main run mode dies, we call the error mode. If we trapped the death of the error mode, what would do then? I don't think we want to call error_mode() recursively, and don't want an error_error_mode(). Perhaps we should emulate Apache's behavior here, returning a page with text like this: "500. There was an internal server error when loading this page. Further, there was a problem loading error page." Show quoted text
> should be protected by an eval, or even better, Try::Tiny.
Phasing in Try::Tiny is a good idea. I think this the error mode idea merits some on-list discussion to create a specific proposal to address it.
From ron [...] savage.net.au Mon Feb 27 16: 34:42 2012
MIME-Version: 1.0
X-Spam-Status: No, score=-1.899 tagged_above=-99.9 required=10 tests=[BAYES_00=-1.9, SPF_FAIL=0.001] autolearn=no
X-Sender: ron [...] savage.net.au
In-Reply-To: <rt-3.8.HEAD-10809-1330352496-323.75205-6-0 [...] rt.cpan.org>
X-Spam-Flag: NO
References: <RT-Ticket-75205 [...] rt.cpan.org> <rt-3.8.HEAD-10809-1330352496-323.75205-6-0 [...] rt.cpan.org>
X-Virus-Scanned: Debian amavisd-new at bestpractical.com
Message-ID: <4F4BF6D6.8010207 [...] savage.net.au>
Content-Type: text/plain; charset=UTF-8; format=flowed
X-RT-Original-Encoding: utf-8
X-Spam-Score: -1.899
Received: from localhost (localhost [127.0.0.1]) by hipster.bestpractical.com (Postfix) with ESMTP id 85BCB2400FF for <cpan-bug+CGI-Application [...] hipster.bestpractical.com>; Mon, 27 Feb 2012 16:34:42 -0500 (EST)
Received: from hipster.bestpractical.com ([127.0.0.1]) by localhost (hipster.bestpractical.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 7Y+Uozsm7NAA for <cpan-bug+CGI-Application [...] hipster.bestpractical.com>; Mon, 27 Feb 2012 16:34:41 -0500 (EST)
Received: from la.mx.develooper.com (x1.develooper.com [207.171.7.70]) by hipster.bestpractical.com (Postfix) with SMTP id 1D9D224001F for <bug-CGI-Application [...] rt.cpan.org>; Mon, 27 Feb 2012 16:34:40 -0500 (EST)
Received: (qmail 28973 invoked by uid 103); 27 Feb 2012 21:34:40 -0000
Received: from x16.dev (10.0.100.26) by x1.dev with QMQP; 27 Feb 2012 21:34:40 -0000
Received: from mail1.qnetau.com (HELO mail1.qnetau.com) (202.146.209.5) by 16.mx.develooper.com (qpsmtpd/0.80/v0.80-19-gf52d165) with ESMTP; Mon, 27 Feb 2012 13:34:37 -0800
Received: (qmail 44765 invoked by uid 399); 27 Feb 2012 21:34:28 -0000
Received: from unknown (HELO ?192.168.1.2?) (ron [...] savage.net.au [...] 124.148.132.187) by mail1.qnetau.com with ESMTPAM; 27 Feb 2012 21:34:28 -0000
Delivered-To: cpan-bug+CGI-Application [...] hipster.bestpractical.com
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.16) Gecko/20120207 Icedove/3.0.11
Subject: Re: [rt.cpan.org #75205] Error mode method call not protected by eval
Return-Path: <ron [...] savage.net.au>
X-Spam-Check-BY: 16.mx.develooper.com
X-Original-To: cpan-bug+CGI-Application [...] hipster.bestpractical.com
X-RT-Mail-Extension: cgi-application
Date: Tue, 28 Feb 2012 08:34:14 +1100
X-Spam-Level:
X-Originating-Ip: 124.148.132.187
To: bug-CGI-Application [...] rt.cpan.org
Content-Transfer-Encoding: 7bit
From: Ron Savage <ron [...] savage.net.au>
RT-Message-ID: <rt-3.8.HEAD-10811-1330378483-1176.75205-0-0 [...] rt.cpan.org>
Content-Length: 1313
Download (untitled) / with headers
text/plain 1.2k
Hi Mark On 28/02/12 01:21, MARKSTOS via RT wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=75205> > > On Tue Feb 21 23:08:07 2012, RSAVAGE wrote:
>> Hi Folks >> >> In Application.pm V 4.50 line line 149 I think the call: >> >> $body = $self->$em( $error ); >> should be protected by an eval, or even better, Try::Tiny.
> > When the main run mode dies, we call the error mode. If we trapped the > death of the error mode, what would do then?
I think by using Try::Tiny the code can gracefully output a specific error msg [1] and then die. [1] Including run mode, method name, autoload status. Show quoted text
> I don't think we want to call error_mode() recursively, and don't want > an error_error_mode().
No, we don't want recursion. Show quoted text
> Perhaps we should emulate Apache's behavior here, returning a page with > text like this: "500. There was an internal server error when loading > this page. Further, there was a problem loading error page."
Too vague if you ask me. Show quoted text
> Phasing in Try::Tiny is a good idea. > > I think this the error mode idea merits some on-list discussion to > create a specific proposal to address it.
Yes. I suggest you forward this email to the list to get started, since it should have enough info in it to orient the reader. -- Ron Savage http://savage.net.au/ Ph: 0421 920 622


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.