ExceptionChainingObjectFactory

A decorating factory that catches any thrown exceptions by decorated factory, and rethrows them with additional information.

A decorating factory that catches any thrown exceptions by decorated factory, and chains it in a new exception that adds additonal debugging information such as registered identity, and cause of exception. It is useful for chaining component instantiation pipeline and printing it for debugging purposes.

Constructors

this
this()

* Default constructor for ExceptionChainingObjectFactory

this
this(ObjectFactory decorated, string id)

* Constructor for ExceptionChainingObjectFactory * * Params: * decorated = factory to be decorated * id = identity of created object, used for exception message.

Members

Functions

factory
Object factory()

Factory an object, and catch any exception wrapping it in a library exception to be rethrown further.

Mixins

__anonymous
mixin AllocatorAwareMixin!(typeof(this))
Undocumented in source.
__anonymous
mixin DestructDecoratorMixin!(typeof(this))
Undocumented in source.
__anonymous
mixin MutableDecoratorMixin!(ObjectFactory)
Undocumented in source.

Properties

id
string id [@property setter]

* Set id * * Params: * id = identity of created object, used for exception message. * Returns: * typeof(this)

id
string id [@property getter]

* Get id * * Returns: * string

locator
Locator!() locator [@property setter]

* Set locator * * Params: * locator = the locator used to locate dependencies for created object. * Returns: * typeof(this)

type
TypeInfo type [@property getter]

* Get type of created object * * Returns: * TypeInfo

Meta