Yukki::Error - Yukki's exception class
version 0.140290
Yukki::Error->throw("Something really bad.", { ... });
If you look at Throwable::Error, you know what this is. Same thing, different name.
my $error = http_exception('message', { status => 'InternalServerError', show_stask_trace => 0, });
Creates a new exception object. Calls the constructor for Yukki:Error and applied the HTTP::Throwable status role needed (prior to construction actually).
http_throw('message', { status => 'InternalServerError', show_stask_trace => 0, });
Constructs the exception (via "http_exception") and throws it.
This is the name of the status role from HTTP::Throwable that will be applied to the exception when it is thrown.
These are lazy.
sub default_status_code { 500 } sub default_reason { 'Internal Server Error' }
Sets it up so that the constructor will take the message as the first argument.
Renders the HTML body for the error.
Setup the HTTP headers.
Returns the message.
Andrew Sterling Hanenkamp <hanenkamp@cpan.org>
This software is copyright (c) 2014 by Qubling Software LLC.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install Yukki, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Yukki
CPAN shell
perl -MCPAN -e shell install Yukki
For more information on module installation, please visit the detailed CPAN module installation guide.