Thrown when a service is not found by the container.

Usually, Container.register wasn't called.

Or, the bundle that provides the service was not loaded, see ExtendableContainer.addExtension.

Example

// container.register(Tractor, []); // Should have been called 

container.get(Tractor); // Error 'Tractor' is not a registered service!

Hierarchy

  • Error
    • ServiceNotFoundError

Properties

prepareStackTrace?: ((err, stackTraces) => any)

Optional override for formatting stack traces

Type declaration

stackTraceLimit: number
cause?: unknown
name: string
message: string
stack?: string

Methods

  • Create .stack property on a target object

    Parameters

    • targetObject: object
    • Optional constructorOpt: Function

    Returns void

Generated using TypeDoc