|
NAMENet::RNDC::Exception - Internal exception classVERSIONversion 0.003SYNOPSISFor 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"; } }; DESCRIPTIONThis 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.ConstructornewNet::RNDC::Exception->new($error); Constructs a new exception with the given $error and attached file/line number information to it. Required Arguments:
MethodsErrormy $error = $exception->error; Returns a string containing the error from object construction, along with a file and line identifier. AUTHORMatthew Horsfall (alh) <WolfSage@gmail.com>LICENSEYou may distribute this code under the same terms as Perl itself.
Visit the GSP FreeBSD Man Page Interface. |