-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove error erasures #8272
Merged
Merged
Remove error erasures #8272
Conversation
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
pullapprove
bot
requested review from
andy31415,
bhaskar-apple,
bzbarsky-apple,
chrisdecenzo,
Damian-Nordic,
hawk248,
jepenven-silabs,
msandstedt and
mspang
July 9, 2021 22:40
bzbarsky-apple
approved these changes
Jul 10, 2021
kpschoedel
force-pushed
the
error-erasure
branch
from
July 10, 2021 22:24
18b4c99
to
262f8ce
Compare
Marking WIP because this depends on #8179 |
Size increase report for "nrfconnect-example-build" from 0e19e0d
Full report output
|
msandstedt
approved these changes
Jul 12, 2021
kpschoedel
force-pushed
the
error-erasure
branch
from
July 12, 2021 22:01
262f8ce
to
efcadf2
Compare
mspang
approved these changes
Jul 12, 2021
Size increase report for "gn_qpg-example-build" from c1629cc
Full report output
|
@kpschoedel Build failures? |
Size increase report for "esp32-example-build" from c1629cc
Full report output
|
saurabhst
approved these changes
Jul 13, 2021
Damian-Nordic
approved these changes
Jul 13, 2021
#### Problem Various code of the form error = chipf(); Verify(error != CHIP_NO_ERROR, error = CHIP_OTHER_ERROR) simply discards an error and replaces it with another, usually CHIP_ERROR_INTERNAL. This has two problems: - on small platforms, it uses extra code; - on large platforms, it is planned that the CHIP_ERROR type will track the original source location of the error, and throwing this away will impede troubleshooting. #### Change overview Use the original error code instead of replacing it. #### Testing No affected tests check for specific error codes. Unit tests should be expected to catch any unintended changes to functionality.
kpschoedel
force-pushed
the
error-erasure
branch
from
July 13, 2021 15:29
efcadf2
to
bc164d0
Compare
kpschoedel
force-pushed
the
error-erasure
branch
from
July 13, 2021 19:12
bc164d0
to
d832890
Compare
nikita-s-wrk
pushed a commit
to nikita-s-wrk/connectedhomeip
that referenced
this pull request
Sep 23, 2021
* Remove error erasures #### Problem Various code of the form error = chipf(); Verify(error != CHIP_NO_ERROR, error = CHIP_OTHER_ERROR) simply discards an error and replaces it with another, usually CHIP_ERROR_INTERNAL. This has two problems: - on small platforms, it uses extra code; - on large platforms, it is planned that the CHIP_ERROR type will track the original source location of the error, and throwing this away will impede troubleshooting. #### Change overview Use the original error code instead of replacing it. #### Testing No affected tests check for specific error codes. Unit tests should be expected to catch any unintended changes to functionality. * build fixes * build fixes
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem
Various code of the form
simply discards an error and replaces it with another, usually
CHIP_ERROR_INTERNAL. This has two problems:
track the original source location of the error, and throwing
this away will impede troubleshooting.
Change overview
Use the original error code instead of replacing it.
Testing
No affected tests check for specific error codes. Unit tests should
be expected to catch any unintended changes to functionality.