Build Status

NAME

Net::Airbrake - Airbrake Notifier API V3 Client

SYNOPSIS

use Net::Airbrake;

my $airbrake = Net::Airbrake->new(
    api_key    => 'xxxxxxx',
    project_id => 9999999,
);

eval { die 'Oops' };
$airbrake->notify($@);

DESCRIPTION

Net::Airbrake is a client of Airbrake Notifier API V3.

CLASS METHODS

new(\%param)

Create a new instance.

INSTANCE METHODS

add_error($error)

Add an error. $error accepts HashRef, Object, string generated by die() or just string message. If you want to send raw error report, use HashRef included following key/value pairs:

has_error()

Return true value if the instance has been added error by add_error().

send(\%option)

Send errors added by add_error() to Airbrake. \%option parameter is optional and all key/value pairs of its also optional. You can specify followings to report error details.

details

notify(\%error, \%option)

Shortcut of add_error() and send() combination.

SEE ALSO

Notifier API V3 - https://help.airbrake.io/kb/api-2/notifier-api-v3

AUTHOR

Six Apart, Ltd. sixapart@cpan.org

LICENSE

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.