---
title: CHHapticError.Code
framework: Core Haptics
role: symbol
role_heading: Enumeration
platforms: [iOS 13.0+, iPadOS 13.0+, Mac Catalyst 13.1+, macOS 10.15+, tvOS 14.0+, visionOS 1.0+]
path: corehaptics/chhapticerror/code
---

# CHHapticError.Code

Error codes for framework operations.

## Declaration

```swift
enum Code
```

## Topics

### Error Codes

- [CHHapticError.Code.badEventEntry](corehaptics/chhapticerror/code/badevententry.md)
- [CHHapticError.Code.badParameterEntry](corehaptics/chhapticerror/code/badparameterentry.md)
- [CHHapticError.Code.engineNotRunning](corehaptics/chhapticerror/code/enginenotrunning.md)
- [CHHapticError.Code.engineStartTimeout](corehaptics/chhapticerror/code/enginestarttimeout.md)
- [CHHapticError.Code.fileNotFound](corehaptics/chhapticerror/code/filenotfound.md)
- [CHHapticError.Code.insufficientPower](corehaptics/chhapticerror/code/insufficientpower.md)
- [CHHapticError.Code.invalidAudioResource](corehaptics/chhapticerror/code/invalidaudioresource.md)
- [CHHapticError.Code.invalidAudioSession](corehaptics/chhapticerror/code/invalidaudiosession.md)
- [CHHapticError.Code.invalidEngineParameter](corehaptics/chhapticerror/code/invalidengineparameter.md)
- [CHHapticError.Code.invalidEventDuration](corehaptics/chhapticerror/code/invalideventduration.md)
- [CHHapticError.Code.invalidEventTime](corehaptics/chhapticerror/code/invalideventtime.md)
- [CHHapticError.Code.invalidEventType](corehaptics/chhapticerror/code/invalideventtype.md)
- [CHHapticError.Code.invalidParameterType](corehaptics/chhapticerror/code/invalidparametertype.md)
- [CHHapticError.Code.invalidPatternData](corehaptics/chhapticerror/code/invalidpatterndata.md)
- [CHHapticError.Code.invalidPatternDictionary](corehaptics/chhapticerror/code/invalidpatterndictionary.md)
- [CHHapticError.Code.invalidPatternPlayer](corehaptics/chhapticerror/code/invalidpatternplayer.md)
- [CHHapticError.Code.invalidTime](corehaptics/chhapticerror/code/invalidtime.md)
- [CHHapticError.Code.memoryError](corehaptics/chhapticerror/code/memoryerror.md)
- [CHHapticError.Code.notSupported](corehaptics/chhapticerror/code/notsupported.md)
- [CHHapticError.Code.operationNotPermitted](corehaptics/chhapticerror/code/operationnotpermitted.md)
- [CHHapticError.Code.resourceNotAvailable](corehaptics/chhapticerror/code/resourcenotavailable.md)
- [CHHapticError.Code.serverInterrupted](corehaptics/chhapticerror/code/serverinterrupted.md)
- [CHHapticError.Code.serverInitFailed](corehaptics/chhapticerror/code/serverinitfailed.md)
- [CHHapticError.Code.unknownError](corehaptics/chhapticerror/code/unknownerror.md)

### Initializers

- [init(rawValue:)](corehaptics/chhapticerror/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

### Haptic errors

- [CoreHapticsErrorDomain](corehaptics/corehapticserrordomain.md)
- [CHHapticError](corehaptics/chhapticerror.md)
