The Exception Helper gives you the ability to manipulate vCloud SDK exceptions (VMware_VCloud_SDK_Exception) with ease. It allows extracting the error codes and messages from the original exception message, with is just raw XML of the form:
xml
<Error
xmlns="http://www.vmware.com/vcloud/v1.5"
message="xs:string"
majorErrorCode="xs:int"
minorErrorCode="xs:string"
vendorSpecificErrorCode="xs:string"
stackTrace="xs:string"
/>
__construct(\VMware_VCloud_SDK_Exception $originalException)
\VMware_VCloud_SDK_Exception
Any exception thrown by VMware VCloud SDK for PHP
create(\VMware_VCloud_SDK_Exception $originalException) : \VCloud\Helpers\Exception
\VCloud\Helpers\Exception::create($e)->getMessage()
Since PHP 5.4, Class member access on instantiation is allowed:
new (\VCloud\Helpers\Exception($e))->getMessage()
\VMware_VCloud_SDK_Exception
Any exception thrown by VMware VCloud SDK for PHP
\VCloud\Helpers\Exception
Returns a new Exception Handler
getOriginalException() : \VMware_VCloud_SDK_Exception
\VMware_VCloud_SDK_Exception
The original exception
getMessage() : string
string
The error message
getMajorErrorCode() : string
string
The error major error code
getMinorErrorCode() : string
string
The error minor error code
getStackTrace() : string
string
The error stack trace
originalException : \Exception
var |
The original exception |
---|
\Exception
document : \SimpleXMLElement
var |
The parsed error message |
---|
\SimpleXMLElement