---
title: CLError.Code
framework: corelocation
role: symbol
role_heading: Enumeration
path: corelocation/clerror-swift.struct/code
---

# CLError.Code

Error codes returned by the location manager object.

## Declaration

```swift
enum Code
```

## Overview

Overview Instances of NSError object delivered to the delegate use these error codes for the code property of the error object.

## Topics

### Getting general errors

- [CLError.Code.locationUnknown](corelocation/clerror-swift.struct/code/locationunknown.md)
- [CLError.Code.denied](corelocation/clerror-swift.struct/code/denied.md)
- [CLError.Code.promptDeclined](corelocation/clerror-swift.struct/code/promptdeclined.md)
- [CLError.Code.network](corelocation/clerror-swift.struct/code/network.md)
- [CLError.Code.headingFailure](corelocation/clerror-swift.struct/code/headingfailure.md)
- [CLError.Code.rangingUnavailable](corelocation/clerror-swift.struct/code/rangingunavailable.md)
- [CLError.Code.rangingFailure](corelocation/clerror-swift.struct/code/rangingfailure.md)

### Getting region monitoring errors

- [CLError.Code.regionMonitoringDenied](corelocation/clerror-swift.struct/code/regionmonitoringdenied.md)
- [CLError.Code.regionMonitoringFailure](corelocation/clerror-swift.struct/code/regionmonitoringfailure.md)
- [CLError.Code.regionMonitoringSetupDelayed](corelocation/clerror-swift.struct/code/regionmonitoringsetupdelayed.md)
- [CLError.Code.regionMonitoringResponseDelayed](corelocation/clerror-swift.struct/code/regionmonitoringresponsedelayed.md)

### Getting geocoding errors

- [CLError.Code.geocodeCanceled](corelocation/clerror-swift.struct/code/geocodecanceled.md)
- [CLError.Code.geocodeFoundNoResult](corelocation/clerror-swift.struct/code/geocodefoundnoresult.md)
- [CLError.Code.geocodeFoundPartialResult](corelocation/clerror-swift.struct/code/geocodefoundpartialresult.md)

### Getting deferred location update errors

- [CLError.Code.deferredFailed](corelocation/clerror-swift.struct/code/deferredfailed.md)
- [CLError.Code.deferredCanceled](corelocation/clerror-swift.struct/code/deferredcanceled.md)
- [CLError.Code.deferredAccuracyTooLow](corelocation/clerror-swift.struct/code/deferredaccuracytoolow.md)
- [CLError.Code.deferredDistanceFiltered](corelocation/clerror-swift.struct/code/deferreddistancefiltered.md)
- [CLError.Code.deferredNotUpdatingLocation](corelocation/clerror-swift.struct/code/deferrednotupdatinglocation.md)

### Enumeration cases

- [CLError.Code.historicalLocationError](corelocation/clerror-swift.struct/code/historicallocationerror.md)

### Initializers

- [init(rawValue:)](corelocation/clerror-swift.struct/code/init(rawvalue:).md)

## Relationships

### Conforms To

- [BitwiseCopyable](swift/bitwisecopyable.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [RawRepresentable](swift/rawrepresentable.md)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)

## See Also

### Getting general errors

- [locationUnknown](corelocation/clerror-swift.struct/locationunknown.md)
- [denied](corelocation/clerror-swift.struct/denied.md)
- [promptDeclined](corelocation/clerror-swift.struct/promptdeclined.md)
- [network](corelocation/clerror-swift.struct/network.md)
- [headingFailure](corelocation/clerror-swift.struct/headingfailure.md)
- [rangingUnavailable](corelocation/clerror-swift.struct/rangingunavailable.md)
- [rangingFailure](corelocation/clerror-swift.struct/rangingfailure.md)
