Skip to content
This repository has been archived by the owner on Feb 6, 2020. It is now read-only.

Commit

Permalink
Merge pull request zendframework/zendframework#3139 branch 'hotfix/ad…
Browse files Browse the repository at this point in the history
…d-detail-to-exception-message'
  • Loading branch information
Maks3w committed Dec 3, 2012
3 parents 34e7aec + 2fcaf1c + 5d8b4a2 commit be139c0
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/ServiceManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -630,7 +630,11 @@ public function setAlias($alias, $nameOrAlias)
}

if ($this->allowOverride === false && $this->has(array($cAlias, $alias), false)) {
throw new Exception\InvalidServiceNameException('An alias by this name already exists');
throw new Exception\InvalidServiceNameException(sprintf(
'An alias by the name "%s" or "%s" already exists',
$cAlias,
$alias
));
}

$this->aliases[$cAlias] = $nameOrAlias;
Expand Down

0 comments on commit be139c0

Please sign in to comment.