SwiftBluetooth icon indicating copy to clipboard operation
SwiftBluetooth copied to clipboard

`fatalError()` not acceptable in production code

Open neilt opened this issue 1 year ago • 0 comments

There are 8 cases of fatalError() in the non-test code. This is really not acceptable for production code.

There are several remedies:

  1. These really are coding errors. I don't understand the code well enough yet to know, but if that is the case and since these are all related to knownCharacteristics, then the fatalError() message should include the the known characteristics. However, since known characteristics are specific to a device I don't see how this is the correct solution.
  2. Replace fatalError()s with correct error handling code.

neilt avatar May 28 '24 13:05 neilt