NAME
CatalystX::Utils::HttpException - A basic way to throw exceptions
SYNOPSIS
use CatalystX::Utils::HttpException;
throw_http $code, %extra;
## OR ##
CatalystX::Utils::HttpException->throw(500, %extra);
## OR Subclass for your use case ##
package MyApp::Exception::Custom;
use Moose;
extends 'CatalystX::Utils::HttpException';
has '+status' => (init_arg=>undef, default=>sub {418});
has '+errors' => (init_args=?indef, default=>sub {'Coffee not allowed!'});
DESCRIPTION
If you need to throw an exception from code called by Catalyst, such as code deep inside your DBIx::Class classes and you want to signal how to handle the issue you an use this. You can also use this to subclass your own custom messages that will get properly handled in a web context.