NAME

Myriad::Exception::Builder - applies Myriad::Exception::Base to an exception class

DESCRIPTION

See Myriad::Exception for the rôle that defines the exception API.

declare_exception

Creates a new exception under the Myriad::Exception namespace.

This will be a class formed from the caller's class:

  • called from Myriad::*, would strip the Myriad:: prefix

  • any other class will remain intact

e.g. Myriad::RPC when calling this would end up with classes under Myriad::Exception::RPC, but SomeCompany::Service::Example would get Myriad::Exception::SomeCompany::Service::Example as the exception base class.

Takes the following parameters:

  • $name - the exception

  • %args - extra details

Details can currently include:

  • category

  • message

Returns the generated classname.

AUTHOR

Deriv Group Services Ltd. DERIV@cpan.org.

See "CONTRIBUTORS" in Myriad for full details.

LICENSE

Copyright Deriv Group Services Ltd 2020-2021. Licensed under the same terms as Perl itself.