The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

XAS::Lib::Mixin::Handlers - A mixin to provide exception handlers.

SYNOPSIS

 use XAS::Class
    version => '0.01',
    base    => 'XAS::Base',
    mixin   => 'XAS::Lib::Mixin::Handlers'
 ;

DESCRIPTION

This module provides exception handlers. It is implemented as a mixin.

METHODS

error_handler($ex)

This method will write an 'error' entry to the current log. It takes these parameters:

$ex

The exception to handle.

exception_hander($ex)

The method will write an 'error' entry to the current log and send an alert. It takes these parameters:

$ex

The exception to handle.

exit_handler($ex)

The method will write an 'fatal' entry to the current log, send an alert and return an exit code. It takes these parameters:

$ex

The exception to handle.

SEE ALSO

XAS

AUTHOR

Kevin L. Esteb, <kevin@kesteb.us>

COPYRIGHT AND LICENSE

Copyright (C) 2014 Kevin L. Esteb

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.8 or, at your option, any later version of Perl 5 you may have available.

See http://dev.perl.org/licenses/ for more information.