diff --git a/library/Zend/ServiceManager/ServiceManager.php b/library/Zend/ServiceManager/ServiceManager.php index 7ce23028fce..21bbea64172 100644 --- a/library/Zend/ServiceManager/ServiceManager.php +++ b/library/Zend/ServiceManager/ServiceManager.php @@ -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;