NAME

XAO::Errors - throwable errors namespace support

SYNOPSIS

package XAO::Fubar;
use XAO::Errors qw(XAO::Fubar);

sub foo {
   ...
   throw XAO::E::Fubar "foo - wrong arguments";
}

DESCRIPTION

Magic module that creates error namespaces for caller's. Should be used in situations like that. Say you create a XAO module called XAO::DO::Data::Product and want to throw errors from it. In order for these errors to be distinguishable you need separate namespace for them -- that's where XAO::Errors comes to rescue.

In the bizarre case when you want more then one namespace for errors - you can pass these namespaces into XAO::Errors and it will make them throwable. It does not matter what to pass to XAO::Errors - the namespace of an error or the namespace of the package, the result would always go into XAO::E namespace.

AUTHOR

Copyright (c) 2001 XAO Inc.

Author is Andrew Maltsev <am@xao.com>.