NotFoundException
PSR-11 NotFoundExceptionInterface: nothing is bound under the requested id and no autowireable class or alias answers to it either.
Thrown by Container::get() only when resolution finds no candidate at all. A candidate that exists but cannot be built fails with ContainerException instead, so “there is no such service” stays distinguishable from “the service is broken”. Container::tryGet() answers null rather than raising this.
Synopsis
Section titled “Synopsis”class NotFoundException extends RuntimeException implements NotFoundExceptionInterface
| Extends | RuntimeException |
| Implements | NotFoundExceptionInterface |
| Source | DI/Container.php |
Inherited methods
Section titled “Inherited methods”These come from an ancestor and are documented where they are declared.
| Method | Declared in | Description |
|---|---|---|
getCode() | Exception | |
getFile() | Exception | |
getLine() | Exception | |
getMessage() | Exception | |
getPrevious() | Exception | |
getTrace() | Exception | |
getTraceAsString() | Exception |