-
-
21 Apr 2016 09:50:02 UTC
- Development release
- Distribution: Net-RNDC
- Module version: 0.004
- Source (raw)
- Browse (raw)
- Changes
- Homepage
- How to Contribute
- Repository
- Issues (2)
- Testers
- Kwalitee
Bus factor: 1- License: perl_5
- Activity
24 month- Tools
- Download (20.22KB)
- MetaCPAN Explorer
- Permissions
- Subscribe to distribution
- Permalinks
- This version
- Latest version
NAME
Net::RNDC::Exception - Internal exception class
VERSION
version 0.004
SYNOPSIS
For use within Net::RNDC* only.
To throw an error:
die Net::RNDC::Exception->new("some error");
Typically used with Try::Tiny:
try { something_that_dies_like_above(); } catch { my $err = $_; if (UNIVERSAL::isa($err, 'Net::RNDC::Exception')) { warn "Error: " . $err->error . "\n"; } };
DESCRIPTION
This package is used to pass exceptions around internally so that a simple error interface can be exposed by the API and any actual exceptions are real problems with usage/bugs.
Constructor
new
Net::RNDC::Exception->new($error);
Constructs a new exception with the given $error and attached file/line number information to it.
Required Arguments:
$error - A string describing the error.
Methods
Error
my $error = $exception->error;
Returns a string containing the error from object construction, along with a file and line identifier.
AUTHOR
Matthew Horsfall (alh) <WolfSage@gmail.com>
LICENSE
You may distribute this code under the same terms as Perl itself.
Module Install Instructions
To install Net::RNDC::Packet, copy and paste the appropriate command in to your terminal.
cpanm Net::RNDC::Packet
perl -MCPAN -e shell install Net::RNDC::Packet
For more information on module installation, please visit the detailed CPAN module installation guide.