Articulate::Error - represent an error or exception in processing a request
throw_error 'Forbidden'; throw_error NotFound => "I don't want to alarm you, but it seems to be missiong";
This creates an error of the type provided and throws it immediately. These are things like Articulate::Error::Forbidden.
Articulate::Error::Forbidden
An ordinary Moo constructor.
Implements the Throwable role - basically die __PACKAGE__->new(@_).
Throwable
die __PACKAGE__->new(@_)
Be kind and let the user know what happened, in summary. Default is 'An unknown error has occurred'.
That said, do consider whether this is the right place to put potentially sensitive diagnostic information.
The equivalent status code.
Defaults to 500, always an integer.
Tries to take a sensible guess at where in your code this was actually thrown from. This may vary, don't rely on it!
To install Articulate, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Articulate
CPAN shell
perl -MCPAN -e shell install Articulate
For more information on module installation, please visit the detailed CPAN module installation guide.