Custom error page set by option "error_template" works fine, but it's not really solution. Thanks, Tomasz W dniu 2012-03-16 00:53, damien krotkine pisze:
Hi,
Sorry it's a bit off topic, but if you want to use exceptions, Dancer already provides its own exception class(es), you should probably read the doc:
https://metacpan.org/module/Dancer::Exception
Now, about your issue, did you try to set a 500 custom error page ?
On 15 March 2012 18:11, Tomasz Konojacki <xenu@poczta.onet.pl <mailto:xenu@poczta.onet.pl>> wrote:
Oops, forget about "Exception::Class" part, code should look like this:
--begin--
# This is application generated by "dancer -a test", only test/lib/test.pm <http://test.pm> was modified package test; use Dancer ':syntax';
our $VERSION = '0.1';
get '/' => sub { <<EOF; <!doctype html> <html> <head><title>test</title></__head> <body> <form action="/" method="post"> <input type="text" name="login"><br> <input type="password" name="password"><br> <input type="submit" name="submit"> </form> </body> EOF
};
post '/' => sub { die 'error!'; };
true; --end--
_________________________________________________ Dancer-users mailing list Dancer-users@perldancer.org <mailto:Dancer-users@perldancer.org> http://www.backup-manager.org/__cgi-bin/listinfo/dancer-users <http://www.backup-manager.org/cgi-bin/listinfo/dancer-users>