public function registerAlias($alias, $existing)
{
if ($this->getAlias($alias) !== null) {
throw new ResourceOccupiedException("ServiceProvider alias of {$alias} is already registered.");
}
$this->serviceAliases[$alias] = $existing;
if ($this->booted) {
$ex = null;
try {
$this->container->alias($alias, $existing);
} catch (Error $ex) {
} catch (Exception $ex) {
}
if ($ex !== null) {
throw new ExecutionException("Alias [{$alias}] could not be registered.", $ex);
}
}
}