Al Newkirk > Bubblegum-0.19 > Bubblegum::Exception

Download:
Bubblegum-0.19.tar.gz

Dependencies

Annotate this POD

Website

View/Report Bugs
Module Version: 0.19   Source   Latest Release: Bubblegum-0.45

NAME ^

Bubblegum::Exception - General Purpose Exception Class for Bubblegum

VERSION ^

version 0.19

SYNOPSIS ^

    Bubblegum::Exception->throw('oh nooo!!!');

DESCRIPTION ^

Bubblegum::Exception provides a general purpose exception object to be thrown and caught and rethrow. This module is derives from Exception::Tiny and provides all the functionality found in that module. Additionally, this module allows you to include arbitrary data which can be access by the block which catches the exception.

    try {
        Bubblegum::Exception->throw(
            message => 'you broke something',
            data    => $something
        );
    }
    catch ($exception) {
        if ($exception->data->isa('Something')) {
            $exception->rethrow;
        }
    };

AUTHOR ^

Al Newkirk <anewkirk@ana.io>

COPYRIGHT AND LICENSE ^

This software is copyright (c) 2013 by Al Newkirk.

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

syntax highlighting: