NAME

Object::Simple::Error - Error object for Object::Simple

VERSION

Version 0.0201

DESCRIPTION

Object::Simple::Error provide structured error system to Object::Simple.

You can create structure err message.

If err is ocuured, You can get err object;

CAUTION

Object::Simple::Error is yet experimental stage.

Please wait untill Object::Simple::Error is stable.

SYNOPSIS

use Object::Simple::Error;

# create error object;
my $err_str = Object::Simple::Error->new( 
    type => 'err_type',
    message => 'message',
    info => { some1 => 'some info1', some2 => 'some info2' }
);

# throw err
Object::Simple::Error->throw( 
    type => 'err_type',
    message => 'message',
    info => { some1 => 'some info1', some2 => 'some info2' }
);

ACCESSOR

You can contain variouse error information.

type

is error type.

message

is error message

position

is position in which error is occured.

You do not have to specify this attr in create_err_str argument.

position is automatically set, parsing croak message or die message.

class

class name

attr

is attr name

value

is attribute value

info

is information other than type, message or position.

This is hash ref.

METHOD

new

is constructor;

my $err_obj = Object::Simple::Error->new(
    type => 'err_type',
    message => 'message',
    info => { some1 => 'some info1', some2 => 'some info2' }
);

throw

thorw error.

Object::Simple::Error->throw( 
    type => 'err_type',
    message => 'message',
    info => { some1 => 'some info1', some2 => 'some info2' }
);

This is same as

die Object::Simple::Error->new( 
    type => 'err_type',
    message => 'message',
    info => { some1 => 'some info1', some2 => 'some info2' }
);

AUTHOR

Yuki Kimoto, <kimoto.yuki at gmail.com>

BUGS

Please report any bugs or feature requests to bug-simo-error at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Object-Simple-Error. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

SUPPORT

You can find documentation for this module with the perldoc command.

perldoc Object::Simple::Error

You can also look for information at:

ACKNOWLEDGEMENTS

COPYRIGHT & LICENSE

Copyright 2009 Yuki Kimoto, all rights reserved.

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