-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make CHIP_ERROR a class type on Linux (#8383)
* Make CHIP_ERROR a class type on Linux #### Problem Having `CHIP_ERROR` be a class type would provide (a) type safety, and (b) the ability to trace the source of errors (issue #8340). #### Change overview - Added a transitional configuration option to select whether `CHIP_ERROR` is an integer (as now) or a class type. Initially, only the Linux platform is configured with a class. The intent is to incrementally fix integer assumptions in other platforms, and finally remove the configuration flag and streamline the `ChipError` class. - Since logging calls had to modified anyway, added `FormatError()`, which can be configured to either return an integer value or a string (via `ErrorStr()`). - Fixed some actual type errors, where non-CHIP_ERROR values were treated as CHIP_ERRORs. (None appear to have had more serious consequences than a nonsense message from ErrorStr().) #### Testing - Modified affected unit tests. - Sanity check using chip-tool. * review * review * zap regen
- Loading branch information
1 parent
b9ad8d8
commit 1641428
Showing
81 changed files
with
1,269 additions
and
1,152 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.