Skip to content

Make ATTError an extensible struct#201

Open
dpogueproton wants to merge 1 commit intoPureSwift:masterfrom
ProtonIntel:atterror-struct
Open

Make ATTError an extensible struct#201
dpogueproton wants to merge 1 commit intoPureSwift:masterfrom
ProtonIntel:atterror-struct

Conversation

@dpogueproton
Copy link
Copy Markdown

Issue

Fixes #200.

What does this PR Do?

Converts ATTError from an enum to a struct to allow for extending with additional application-specific error codes.

ATTError(rawValue: 0) returns nil because 0x00 is the success code.

All the pre-defined errors are set up so they return a non-Optional ATTError, and this should be API compatible with all existing code.

Where should the reviewer start?

ATTError.swift

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ATTError cannot support additional common error codes

1 participant