NAME
At::Error - Specialized Exception Class for AT Protocol
SYNOPSIS
use At::Error qw[throw];
# Create and throw
At::Error->new( message => 'Something went wrong', fatal => 1 )->throw;
# Using the exported throw helper
throw At::Error->new( message => 'Oops' );
DESCRIPTION
At::Error is the primary exception class used by At. It supports stack traces and can be fatal or non-fatal (warnings).
Methods
new( message = ..., [ description => ..., fatal => ... ] )>
Constructor. message is required.
message()
Returns the error message.
description()
Returns the optional error description (often from the server).
fatal()
Returns true if the error is considered fatal.
throw()
Throws the error. If fatal is true, it uses die. Otherwise, it uses warn.
Functions
register( $name, $is_fatal )
Registers a new error constructor in the caller's namespace.
LICENSE
Copyright (C) Sanko Robinson.
This library is free software; you can redistribute it and/or modify it under the terms found in the Artistic License 2. Other copyrights, terms, and conditions may apply to data transmitted through this module.
AUTHOR
Sanko Robinson <sanko@cpan.org>