Skip to content

Allow defining custom method to raise lookup failure exception

Choose a tag to compare

@thetutlage thetutlage released this 29 Sep 14:28

Moving forward one can define a method to raise custom exception when unable to lookup a dependency from the IoC container. For example:

ioc.onLookupFailed = function(namespace) {
  throw new Error(`Unable to resolve ${namespace}`)
}

Commits

  • feat: allow defining custom method to raise lookup failure exception b2bae55
  • refactor: standardize exceptions raised by the container 7af816a
  • chore: update dependencies 5f6f479

v7.0.2...v7.0.3