# TileProviderError

#### new Cesium.TileProviderError(provider, message, x, y, level, timesRetried, error)
engine/Source/Core/TileProviderError.js 21

Provides details about an error that occurred in an `ImageryProvider` or a `TerrainProvider`.

Name | Type | Default | Description
--- | --- | --- | ---
`provider` | ImageryProvider | TerrainProvider |  | The imagery or terrain provider that experienced the error.
`message` | string |  | A message describing the error.
`x` | number |  | optional The X coordinate of the tile that experienced the error, or undefined if the error is not specific to a particular tile.
`y` | number |  | optional The Y coordinate of the tile that experienced the error, or undefined if the error is not specific to a particular tile.
`level` | number |  | optional The level of the tile that experienced the error, or undefined if the error is not specific to a particular tile.
`timesRetried` | number | `0` | optional The number of times this operation has been retried.
`error` | Error |  | optional The error or exception that occurred, if any.

### Members

#### error : Error
engine/Source/Core/TileProviderError.js 83

The error or exception that occurred, if any.

#### level : number
engine/Source/Core/TileProviderError.js 61

The level-of-detail of the tile that experienced the error. If the error is not specific to a particular tile, this property will be undefined.

#### message : string
engine/Source/Core/TileProviderError.js 40

The message describing the error.

#### provider : ImageryProvider|TerrainProvider
engine/Source/Core/TileProviderError.js 34

The `ImageryProvider` or `TerrainProvider` that experienced the error.

#### retry : boolean
engine/Source/Core/TileProviderError.js 77

True if the failed operation should be retried; otherwise, false. The imagery or terrain provider will set the initial value of this property before raising the event, but any listeners can change it. The value after the last listener is invoked will be acted upon.

Default Value: `false`

#### timesRetried : number
engine/Source/Core/TileProviderError.js 68

The number of times this operation has been retried.

Default Value: `0`

#### x : number
engine/Source/Core/TileProviderError.js 47

The X coordinate of the tile that experienced the error. If the error is not specific to a particular tile, this property will be undefined.

#### y : number
engine/Source/Core/TileProviderError.js 54

The Y coordinate of the tile that experienced the error. If the error is not specific to a particular tile, this property will be undefined.

### Methods

#### static Cesium.TileProviderError.reportError(previousError, provider, event, message, x, y, level, errorDetails) → TileProviderError
engine/Source/Core/TileProviderError.js 108

Reports an error in an `ImageryProvider` or `TerrainProvider` by raising an event if it has any listeners, or by logging the error to the console if the event has no listeners. This method also tracks the number of times the operation has been retried.

Name | Type | Description
--- | --- | ---
`previousError` | TileProviderError | The error instance returned by this function the last time it was called for this error, or undefined if this is the first time this error has occurred.
`provider` | ImageryProvider | TerrainProvider | optional The imagery or terrain provider that encountered the error.
`event` | Event | optional The event to raise to inform listeners of the error.
`message` | string | optional The message describing the error.
`x` | number | optional The X coordinate of the tile that experienced the error, or undefined if the error is not specific to a particular tile.
`y` | number | optional The Y coordinate of the tile that experienced the error, or undefined if the error is not specific to a particular tile.
`level` | number | optional The level-of-detail of the tile that experienced the error, or undefined if the error is not specific to a particular tile.
`errorDetails` | Error | optional The error or exception that occurred, if any.

##### Returns:

The error instance that was passed to the event listeners and that should be passed to this function the next time it is called for the same error in order to track retry counts.

#### static Cesium.TileProviderError.reportSuccess(previousError)
engine/Source/Core/TileProviderError.js 160

Reports success of an operation by resetting the retry count of a previous error, if any. This way, if the error occurs again in the future, the listeners will be informed that it has not yet been retried.

Name | Type | Description
--- | --- | ---
`previousError` | TileProviderError | The previous error, or undefined if this operation has not previously resulted in an error.

### Type Definitions

#### Cesium.TileProviderError.RetryFunction()
engine/Source/Core/TileProviderError.js 166

A function that will be called to retry the operation.

Need help? The fastest way to get answers is from the community and team on the Cesium Forum.