## API Documentation

# Gdata/Gapps/ServiceException.php

Zend Framework

LICENSE

This source file is subject to the new BSD license that is bundled with this package in the file LICENSE.txt. It is also available through the world-wide-web at this URL: http://framework.zend.com/license/new-bsd If you did not receive a copy of the license and are unable to obtain it through the world-wide-web, please send an email to license@zend.com so we can send you a copy immediately.

category
  Zend
copyright
  Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)
license
  New BSD License
package
  Zend_Gdata
subpackage
  Gapps
version
  $Id: ServiceException.php 23775 2011-03-01 17:25:24Z ralph $

## \Zend_Gdata_Gapps_ServiceException
jump to top

Gdata Gapps Exception class. This is thrown when an AppsForYourDomainErrors message is received from the Google Apps servers.

Several different errors may be represented by this exception. For a list of error codes available, see getErrorCode.

Extends from
  \Zend_Exception
category
  Zend
copyright
  Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)
license
  New BSD License
package
  Zend_Gdata
subpackage
  Gapps

### Properties

`array $_errors= 'array'`

Array of Zend_Gdata_Error objects indexed by error code.

Default value `array` Details

Type
  array

`$_rootElement= 'AppsForYourDomainErrors'`
Default value `AppsForYourDomainErrors` Details

Type

### Methods

`__call( string $method, array $args ) : mixed`

Overloading

Inherited from: \Zend_Exception::__call()

For PHP < 5.3.0, provides access to the getPrevious() method.

Parameters

Name | Type | Description
--- | --- | ---
$method | string |
$args | array |

Returns

Type | Description
--- | ---
mixed |

`__construct( $errors = null ) : array`

Create a new ServiceException.

Parameters

Name | Type | Description
--- | --- | ---
$errors |  |

Returns

Type | Description
--- | ---
array | An array containing a collection of Zend_Gdata_Gapps_Error objects.

`__toString( ) : string`

Get a human readable version of this exception.

Returns

Type | Description
--- | ---
string |

`_getPrevious( ) : \Exception|null`

Returns previous Exception

Inherited from: \Zend_Exception::_getPrevious()
Returns

Type | Description
--- | ---
\Exceptionnull |

`addError( \Zend_Gdata_Gapps_Error $error ) : void`

Add a single Error object to the list of errors received by the server.

Parameters

Name | Type | Description
--- | --- | ---
$error | \Zend_Gdata_Gapps_Error | An instance of an error returned by the server. The error's errorCode must be set.

Throws

Exception | Description
--- | ---
\Zend_Gdata_App_Exception |

`getCode( ) : void`
final

Inherited from:
`getError( $errorCode ) : \Zend_Gdata_Gapps_Error`

Return the Error object associated with a specific error code.

Parameters

Name | Type | Description
--- | --- | ---
$errorCode |  |

Returns

Type | Description
--- | ---
\Zend_Gdata_Gapps_Error | The Error object requested, or null if not found.

`getErrors( ) : array`

Get the list of errors as sent by the server inside of an AppsForYourDomainErrors tag.

Returns

Type | Description
--- | ---
array | An associative array containing a collection of Zend_Gdata_Gapps_Error objects, indexed by error code.

`getFile( ) : void`
final

Inherited from:
`getLine( ) : void`
final

Inherited from:
`getMessage( ) : void`
final

Inherited from:
`getPrevious( ) : void`
final

Inherited from:
`getTrace( ) : void`
final

Inherited from:
`getTraceAsString( ) : void`
final

Inherited from:
`hasError( integer $errorCode ) : boolean`

Check whether or not a particular error code was returned by the server.

Parameters

Name | Type | Description
--- | --- | ---
$errorCode | integer | The error code to check against.

Returns

Type | Description
--- | ---
boolean | Whether or not the supplied error code was returned by the server.

`importFromString( string $string ) : \Zend_Gdata_Gapps_ServiceException`

Import an AppsForYourDomain error from XML.

Parameters

Name | Type | Description
--- | --- | ---
$string | string | The XML data to be imported

Returns

Type | Description
--- | ---
\Zend_Gdata_Gapps_ServiceException | Provides a fluent interface.

Throws

Exception | Description
--- | ---
\Zend_Gdata_App_Exception |

`setErrors( array $array ) : void`

Set the list of errors as sent by the server inside of an AppsForYourDomainErrors tag.

Parameters

Name | Type | Description
--- | --- | ---
$array | array | An associative array containing a collection of Zend_Gdata_Gapps_Error objects. All errors must have their errorCode value set.

Throws

Exception | Description
--- | ---
\Zend_Gdata_App_Exception |

Documentation was generated by DocBlox 0.13.3.