NAME
Opsview::RestAPI::Exception - Opsview::RestAPI Exception object
VERSION
version 1.210670
SYNOPSIS
use Carp qw(croak confess); use Opsview::RestAPI::Exception;
# exception croak(Opsview::RestAPI::Exception->new( message => 'some text', http_code => 404));
# exception with stack trace confess(Opsview::RestAPI::Exception->new( message => 'some text', http_code => 404));
DESCRIPTION
Exception objects created when Opsview::RestAPI encountered problems
METHODS
- $object = Opsview::RestAPI::Exception->new( ... )
-
Create a new exception object. By default will add in package, filename and line the exception occurred on
- $line = $object->line;
- $path = $object->path;
- $filename = $object->filename;
- $package = $object->package;
-
Return the line, path and package the exception occurred in
- $message = $object->message;
-
Return the message provided when the object was created
- $message = $object->http_code;
-
Return the http_code provided when the object was created
- $string = $object->as_string
-
Concatinate the message, path and line into a string string
AUTHOR
Duncan Ferguson <duncan_j_ferguson@yahoo.co.uk>
COPYRIGHT AND LICENSE
This software is copyright (c) 2017 by Duncan Ferguson.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.