Skip to content

Commit 829fc86

Browse files
authored
add content about dependency alias exception
1 parent be61f3b commit 829fc86

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

dependency-container/index.md

+1-2
Original file line numberDiff line numberDiff line change
@@ -145,8 +145,7 @@ router2 := container.get('router') as IRouteMatcher;
145145

146146
## Adding service alias
147147

148-
To register new name for an existing service, dependency container provides method `alias()`.
149-
This method expects two parameters. First parameter is new name for existing service, and second parameter identifies existing service to be aliased.
148+
Dependency container provides method `alias()` to register new name for an existing service. This method expects two parameters. First parameter is new name for existing service, and second parameter identifies existing service to be aliased. It raises `EDependencyAlias` exception when first and second parameter is same or when you try to create alias to other aliased service.
150149

151150
For example, if you have service registered as follows,
152151

0 commit comments

Comments
 (0)