Hi all, Is it possible to use TT to build the content of the 404 and 500 error sites dynamically ? Thanks, Thomas
On 22/02/2011 21:00, Thomas Maier wrote:
Hi all,
Is it possible to use TT to build the content of the 404 and 500 error sites dynamically ?
Well, if it isn't, we need to do it (in fact I think it isn't). Dear architect sukria, my suggestion would be: error_404 => sub { ... }; or _404_ => sub { ... }; Cheers :)
May I kindly suggest on_404 ? _404_ or error_404 could be understood as "send a special 404" my 2 euros dams On 22 February 2011 22:10, ambs <ambs+dancer@perl-hackers.net> wrote:
On 22/02/2011 21:00, Thomas Maier wrote:
Hi all,
Is it possible to use TT to build the content of the 404 and 500 error sites dynamically ?
Well, if it isn't, we need to do it (in fact I think it isn't).
Dear architect sukria, my suggestion would be:
error_404 => sub { ... };
or
_404_ => sub { ... };
Cheers :) _______________________________________________ Dancer-users mailing list Dancer-users@perldancer.org http://www.backup-manager.org/cgi-bin/listinfo/dancer-users
On 22/02/2011 21:18, damien krotkine wrote:
May I kindly suggest on_404 ? _404_ or error_404 could be understood as "send a special 404"
or yet, config.yml FTW: error_handlers: 404: on_not_found 500: oops_500 :)
my 2 euros dams
On 22 February 2011 22:10, ambs<ambs+dancer@perl-hackers.net> wrote:
On 22/02/2011 21:00, Thomas Maier wrote:
Hi all,
Is it possible to use TT to build the content of the 404 and 500 error sites dynamically ?
Well, if it isn't, we need to do it (in fact I think it isn't).
Dear architect sukria, my suggestion would be:
error_404 => sub { ... };
or
_404_ => sub { ... };
Cheers :) _______________________________________________ Dancer-users mailing list Dancer-users@perldancer.org http://www.backup-manager.org/cgi-bin/listinfo/dancer-users
On Tue, Feb 22, 2011 at 10:20 PM, ambs <ambs+dancer@perl-hackers.net> wrote:
On 22/02/2011 21:18, damien krotkine wrote:
May I kindly suggest on_404 ? _404_ or error_404 could be understood as "send a special 404"
or yet, config.yml FTW:
error_handlers: 404: on_not_found 500: oops_500
:)
shouldn't be hard to do this with a plugin (now: who will write the plugin ? :) -- franck cuny http://lumberjaph.net - http://github.com/franckcuny
"Thomas Maier" <hayzer@gmail.com> wrote:
Hi all,
Is it possible to use TT to build the content of the 404 and 500 error sites dynamically ?
I don't recall a particularly clean way to do it currently, but you should be able to add a final route that matches anything, e.g.: get qr(/.*) => sub { status 'not_found'; template '404page'; } Expect cleaner ways coming soon :) -- David Precious <davidp@preshweb.co.uk> Sent from my phone so please excuse brevity / poor quoting style etc
On 22/02/2011 23:18, David Precious wrote:
Expect cleaner ways coming soon :)
As Franck and dams said, it will be very easy and clean to do when we have the hook refactoring up and running. The user/plugin will be able to hook the on_error event and do whatever she likes then, with the error object. Regards, -- Alexis Sukrieh
On 24/02/2011 07:44, Alexis Sukrieh wrote:
On 22/02/2011 23:18, David Precious wrote:
Expect cleaner ways coming soon :)
As Franck and dams said, it will be very easy and clean to do when we have the hook refactoring up and running.
The user/plugin will be able to hook the on_error event and do whatever she likes then, with the error object.
Can I take the ticket to "will create the plugin during the weekend"? If somebody else want's to do it before, let me know. Cheers ambs
participants (7)
-
Alberto Simoes -
Alexis Sukrieh -
ambs -
damien krotkine -
David Precious -
franck -
Thomas Maier