protected getErrorCodeFromServiceException ( MicrosoftAzure\Storage\Common\ServiceException $exception ) : string | ||
$exception | MicrosoftAzure\Storage\Common\ServiceException | |
return | string |
protected function getErrorCodeFromServiceException(ServiceException $exception)
{
$xml = @simplexml_load_string($exception->getErrorReason());
if ($xml && isset($xml->Code)) {
return (string) $xml->Code;
}
return $exception->getErrorReason();
}