Brent Royal-Gordon > WWW-Kontent > WWW::Kontent::Exceptions

Download:
WWW-Kontent-0.02.tar.gz

Annotate this POD

View/Report Bugs
Source  

NAME ^

WWW::Kontent::Exceptions - Kontent exceptions

SYNOPSIS ^

        WWW::Kontent::error("message", :code(402));
        WWW::Kontent::restart(:mode('view'));

DESCRIPTION ^

WWW::Kontent::Exceptions contains functions and classes used to communicate errors and other conditions within Kontent. As Pugs cannot currently throw full objects, this is currently done with strings.

Functions

error

Communicates a fatal error, such as "page not found", to Kontent. The error message is passed in, and an optional HTTP status code can be specified with the named parameter 'code'.

restart

Tells Kontent to change the specified attributes in the request object and restart its attempt to render the page. This can be used to handle situations such as redirects and changes in the page's mode or format.

To help prevent restart loops, at least one attribute must be changed. If you're really sure you don't need to reset anything, simply pass in :renderer(undef); the correct renderer will be filled in after the restart.

XXX currently very out of date

SEE ALSO ^

WWW::Kontent

syntax highlighting: