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> 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 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
http://www.backup-manager.org/cgi-bin/listinfo/dancer-users