[Dancer-users] Invalid content-type sended by dancer when error 500 happens

damien krotkine dkrotkine at gmail.com
Fri Mar 16 00:53:20 CET 2012


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 at 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.pmwas 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 at perldancer.org
> http://www.backup-manager.org/**cgi-bin/listinfo/dancer-users<http://www.backup-manager.org/cgi-bin/listinfo/dancer-users>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.backup-manager.org/pipermail/dancer-users/attachments/20120316/547b58d7/attachment-0001.htm>


More information about the Dancer-users mailing list