Google\Cloud\Exception\ServiceException::getServiceException PHP Method

getServiceException() public method

Return the service exception object.
public getServiceException ( ) : Exception
return Exception
    public function getServiceException()
    {
        return $this->serviceException;
    }

Usage Example

 public function testHasServiceException()
 {
     $previous = new \Exception('test');
     $ex = new ServiceException('foo', 123, $previous);
     $this->assertTrue($ex->hasServiceException());
     $this->assertEquals($previous, $ex->getServiceException());
 }