# Google Data APIs Client Library (1.43.0)

## com.google.gdata.util
Class ErrorDomain.ErrorCode

    java.lang.Object
      com.google.gdata.util.ErrorDomain.ErrorCode

All Implemented Interfaces:
  ErrorContent

Enclosing class:
  ErrorDomain

    public class ErrorDomain.ErrorCode

extends java.lang.Object
implements ErrorContent

ErrorCode objects represent an error code within an error domain. An inner class is used to make it difficult to construct an ErrorCode that accidentally refers to the wrong subclass of ErrorDomain, or to have more than one ErrorDomain object of the same subclass.

An ErrorCode is immutable. The `withInternalReason(String)`, `withExtendedHelp(String)`, and `withSendReport(String)` methods can be used to create new ErrorCodes as modified versions of existing ones.

Nested Class Summary

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

Constructor Summary
`ErrorDomain.ErrorCode(java.lang.String codeName)` Construct a new error code with the given code name.

Method Summary
`java.lang.String` `getCodeName()` Gets the name of this ErrorCode, which must be unique within its domain.
`java.lang.String` `getDebugInfo()` Returns debugging information.
`java.lang.String` `getDomainName()` Retrieve the name of the domain of this ErrorCode.
`java.lang.String` `getExtendedHelp()` Gets the extended help URI.
`java.lang.String` `getInternalReason()` Gets the internal reason (unlocalized explanation) associated with this ErrorCode.
`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.
`ErrorDomain.ErrorCode` `setInternalReason(java.lang.String newInternalReason)` Deprecated. Use `withInternalReason(String)` instead.
`ErrorDomain.ErrorCode` `withExtendedHelp(java.lang.String newExtendedHelp)` Returns a copy of this ErrorCode with the given extended help URI set.
`ErrorDomain.ErrorCode` `withInternalReason(java.lang.String newInternalReason)` Returns a copy of this ErrorCode with the given internal reason (un-internationalized explanation) set.
`ErrorDomain.ErrorCode` `withSendReport(java.lang.String newSendReport)` Returns a copy of this ErrorCode with the given send report URI set.

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

Constructor Detail

### ErrorDomain.ErrorCode

    public ErrorDomain.ErrorCode(java.lang.String codeName)

  Construct a new error code with the given code name.

  Parameters:
    `codeName` - the codename of this error code, must not be null.

Method Detail

### getDomainName

    public java.lang.String getDomainName()

  Retrieve the name of the domain of this ErrorCode.

  Specified by:
    `getDomainName` in interface `ErrorContent`

### getCodeName

    public java.lang.String getCodeName()

  Gets the name of this ErrorCode, 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`

### getInternalReason

    public java.lang.String getInternalReason()

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

  Specified by:
    `getInternalReason` in interface `ErrorContent`

### setInternalReason

    @Deprecated
    public ErrorDomain.ErrorCode setInternalReason(java.lang.String newInternalReason)

  Deprecated. Use `withInternalReason(String)` instead.

### withInternalReason

    public ErrorDomain.ErrorCode withInternalReason(java.lang.String newInternalReason)

  Returns a copy of this ErrorCode with the given internal reason (un-internationalized explanation) set. The value will appear as the content of the `internalReason` element in the XML error format.

### 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`

### withExtendedHelp

    public ErrorDomain.ErrorCode withExtendedHelp(java.lang.String newExtendedHelp)

  Returns a copy of this ErrorCode with the given extended help URI set. This can be used to provide a detailed explanation of the error code. The value will appear as the content of the `extendedHelp` element in the XML error format.

### 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`

### withSendReport

    public ErrorDomain.ErrorCode withSendReport(java.lang.String newSendReport)

  Returns a copy of this ErrorCode with the given send report URI set. This can be used to provide a URI to which a report should be sent when the error is received. The value will appear as the content of the `sendReport` element in the XML error format.

### getLocation

    public java.lang.String getLocation()

  Description copied from interface: `ErrorContent`
  Return the location of the error.

  Specified by:
    `getLocation` in interface `ErrorContent`

### getLocationType

    public ErrorContent.LocationType getLocationType()

  Description copied from interface: `ErrorContent`
  Return the type of error location. See `ErrorContent.LocationType` for the available values.

  Specified by:
    `getLocationType` in interface `ErrorContent`

### getDebugInfo

    public java.lang.String getDebugInfo()

  Description copied from interface: `ErrorContent`
  Returns debugging information.

  Specified by:
    `getDebugInfo` in interface `ErrorContent`