-
Notifications
You must be signed in to change notification settings - Fork 3k
Update BLE error calls to use new error codes and mbed_error #7726
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
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure there is value adding a new error for this specific case.
Would it be possible to use an
INVALID_STATE
error instead ?We already have code such as
INVALID_ARGUMENT
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pan- The value here is to get maximum info about the error scenario just by decoding the error code even if there is no textual output. Please look at the error decoding microsite - https://armmbed.github.io/mbedos-error/. This website takes the error code and generates error context info. Once we integrate other features like device stats API for errors as well, the error-code info collected can be used to get more info. If you still think its not useful we can remove it. Let me know.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the file and line number is reported, is it that useful to have very specific error code ? (If file and line are not accessible; it is very useful).
Do what feels right on this one :).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pan- - The line number/file is not reported by default. It needs a special flag MBED_CONF_PLATFORM_ERROR_FILENAME_CAPTURE_ENABLED. Irrespective of that we plan to report these error-codes into cloud/or other backends and thus having these error codes would provide us more info for analytics/later analysis. Does that makes sense?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's unfortunate it requires a special flag to report the filename and line number as without it the error code in this form is not very comprehensive.
Being dependent on a website to decipher an error code is, from my perspective, not ideal for debugging and it is also limited to the content we feed the website with. I hope their will be some way to run the webpage locally so it is in sync with the sources being run otherwise the whole error code mechanism will be very complex to use with application defined error codes.
Side question: how do you intend to capture in the cloud error codes reported when the system halt ?