
Simo::Error - Error object for Simo [DISCOURAGED]

This module is discouraged now, because I develope new module Object::Simple now.
Object::Simple is very simple class builder. It is clean, compact, and fast.

Version 0.0301


Simo::Error provide structured error system to Simo.
You can create structure err message.
If err is ocuured, You can get err object;

Simo::Error is yet experimental stage.
Please wait untill Simo::Error is stable.

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

You can contain variouse error information.
is error type.
is error message
is position in which error is occured.
You do not have to specify this attr in create_err_str argument.
pos is automatically set, parsing croak message or die message.
is package name
is attr name
is attr value
is information other than type, msg or pos.
This is hash ref.

is constructor;
my $err_obj = Simo::Error->new(
type => 'err_type',
msg => 'message',
info => { some1 => 'some info1', some2 => 'some info2' }
);
thorw error.
Simo::Error->throw(
type => 'err_type',
msg => 'message',
info => { some1 => 'some info1', some2 => 'some info2' }
);
This is same as
die Simo::Error->new(
type => 'err_type',
msg => 'message',
info => { some1 => 'some info1', some2 => 'some info2' }
);

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

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=Simo-Error. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

You can find documentation for this module with the perldoc command.
perldoc Simo::Error
You can also look for information at:


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.