Skip to content

Instantly share code, notes, and snippets.

@dragoonis
Created January 10, 2013 14:18
Show Gist options
  • Save dragoonis/4502321 to your computer and use it in GitHub Desktop.
Save dragoonis/4502321 to your computer and use it in GitHub Desktop.
<?php
/**
* @param string $name The Service Name
* @param bool $usePeeringServiceManagers
* @return array|object
* @throws \Exception
*/
public function get($name, $usePeeringServiceManagers = true)
{
try {
return parent::get($name, $usePeeringServiceManagers);
} catch(\Exception $e) {
do {
$last = $e;
} while ($e = $e->getPrevious());
throw new \Exception($last->getMessage());
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment