# Google Data APIs Client Library (1.43.0)

## com.google.gdata.util
Class ErrorElement

    java.lang.Object
      com.google.gdata.util.ErrorElement

All Implemented Interfaces:
  ErrorContent

    public class ErrorElement

extends java.lang.Object
implements ErrorContent

A mutable `ErrorContent` to hold structured error information.

Nested Class Summary

Nested classes/interfaces inherited from interface com.google.gdata.util.ErrorContent
`ErrorContent.LocationType`

Method Summary
`java.lang.String` `getCodeName()` Gets the name of this ErrorInfo, which must be unique within its domain.
`java.lang.String` `getDebugInfo()` Returns debugging information.
`java.lang.String` `getDomainName()` Return the error domain.
`java.lang.String` `getExtendedHelp()` Gets the extended help URI.
`java.lang.String` `getInternalReason()` Gets the internal reason (unlocalized explanation) associated with this ErrorInfo.
`java.lang.String` `getLocation()` Return the location of the error.
`ErrorContent.LocationType` `getLocationType()` Return the type of error location.
`java.lang.String` `getSendReport()` Gets the URI to which a report should be sent when this error is received.
`ErrorElement` `setCode(java.lang.String codeName)` Set the codename.
`ErrorElement` `setDebugInfo(java.lang.String debugInfo)` Set debugging information.
`ErrorElement` `setDomain(java.lang.String domainName)` Set the domain name.
`ErrorElement` `setExtendedHelp(java.lang.String extendedHelp)` Set URI for extended help.
`ErrorElement` `setHeaderLocation(java.lang.String location)` Set header name for an error in a header.
`ErrorElement` `setInternalReason(java.lang.String internalReason)` Set the error's internal reason.
`ErrorElement` `setLocation(java.lang.String location)` Set a generic error location, using `ErrorContent.LocationType.OTHER` as the location type.
`ErrorElement` `setLocation(java.lang.String location, ErrorContent.LocationType locationType)` Set the location and location type.
`ErrorElement` `setSendReport(java.lang.String sendReport)` Set URI to send report to.
`ErrorElement` `setXpathLocation(java.lang.String location)` Set XPath-based error location.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Method Detail

### getDomainName

    public java.lang.String getDomainName()

  Return the error domain.

  Specified by:
    `getDomainName` in interface `ErrorContent`

### setDomain

    public ErrorElement setDomain(java.lang.String domainName)

  Set the domain name.

  Throws:
    `java.lang.NullPointerException` - if `domainName` is `null`.

### getCodeName

    public java.lang.String getCodeName()

  Gets the name of this ErrorInfo, which must be unique within its domain. The value will appear as the content of the `code` element in the XML error format.

  Specified by:
    `getCodeName` in interface `ErrorContent`

### setCode

    public ErrorElement setCode(java.lang.String codeName)

  Set the codename.

  Throws:
    `java.lang.NullPointerException` - if `codeName` is `null`.

### getLocation

    public java.lang.String getLocation()

  Return the location of the error.

  Specified by:
    `getLocation` in interface `ErrorContent`

### getLocationType

    public ErrorContent.LocationType getLocationType()

  Return the type of error location. See `ErrorContent.LocationType` for the available values.

  Specified by:
    `getLocationType` in interface `ErrorContent`

### setXpathLocation

    public ErrorElement setXpathLocation(java.lang.String location)

  Set XPath-based error location.

  This must be a valid XPath expression sibling to the atom:entry element (or the atom:feed element if we are not in an entry).

  Throws:
    `java.lang.NullPointerException` - if `location` is `null`.

### setHeaderLocation

    public ErrorElement setHeaderLocation(java.lang.String location)

  Set header name for an error in a header.

  Throws:
    `java.lang.NullPointerException` - if `location` is `null`.

### setLocation

    public ErrorElement setLocation(java.lang.String location)

  Set a generic error location, using `ErrorContent.LocationType.OTHER` as the location type.

  Throws:
    `java.lang.NullPointerException` - if `location` is `null`.

### setLocation

    public ErrorElement setLocation(java.lang.String location,
                                    ErrorContent.LocationType locationType)

  Set the location and location type.

  Throws:
    `java.lang.NullPointerException` - if `location` or `locationType` are `null`.

### getInternalReason

    public java.lang.String getInternalReason()

  Gets the internal reason (unlocalized explanation) associated with this ErrorInfo. The value will appear as the content of the `internalReason` element in the XML error format.

  Specified by:
    `getInternalReason` in interface `ErrorContent`

### setInternalReason

    public ErrorElement setInternalReason(java.lang.String internalReason)

  Set the error's internal reason.

  Throws:
    `java.lang.NullPointerException` - if `internalReason` is `null`.

### getExtendedHelp

    public java.lang.String getExtendedHelp()

  Gets the extended help URI. This can be used to retrieve a detailed explanation of the error code. The value will appear as the content of the `extendedHelp` element in the XML error format.

  Specified by:
    `getExtendedHelp` in interface `ErrorContent`

### setExtendedHelp

    public ErrorElement setExtendedHelp(java.lang.String extendedHelp)

  Set URI for extended help.

  Throws:
    `java.lang.NullPointerException` - if `extendedHelp` is `null`.
    `java.lang.IllegalArgumentException` - if `extendedHelp` isn't a valid google URI.

### getSendReport

    public java.lang.String getSendReport()

  Gets the URI to which a report should be sent when this error is received. The value will appear as the content of the `sendReport` element in the XML error format.

  Specified by:
    `getSendReport` in interface `ErrorContent`

### setSendReport

    public ErrorElement setSendReport(java.lang.String sendReport)

  Set URI to send report to.

  Throws:
    `java.lang.NullPointerException` - if `extendedHelp` is `null`.
    `java.lang.IllegalArgumentException` - if `extendedHelp` isn't a valid google URI.

### getDebugInfo

    public java.lang.String getDebugInfo()

  Returns debugging information.

  Specified by:
    `getDebugInfo` in interface `ErrorContent`

### setDebugInfo

    public ErrorElement setDebugInfo(java.lang.String debugInfo)

  Set debugging information.

  Throws:
    `java.lang.NullPointerException` - if `debugInfo` is `null`.