GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  NET::RNDC::EXCEPTION (3)

.ds Aq ’

NAME

Net::RNDC::Exception - Internal exception class

CONTENTS

VERSION

version 0.003

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 <B>B>$error<B>B> and attached file/line number information to it.

Required Arguments:
o <B>B>$error<B>B> - 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.
Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 NET::RNDC::EXCEPTION (3) 2013-01-08

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.