You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Proper gRPC error handling
* Update gRPC API of board command to return status.Status instead of error
* Update gRPC API of remaining commands to return status.Status instead of error
* Replace custom error with protobuf message
Previously, a custom error was returned when attempting to upgrade a platform that was already at the latest available
version. There is dedicated code for handling this specific error.
Now that the function has been changed to return a status.Status instead of error, the previous check for the return
being this error is no longer possible. The capability is restored by replacing the error with a protocol buffer message.
* Handle details of any type in `core.PlatformUpgrade()` status
The status details of the function are used to identify the specific cause of a non-nil status. This is done via a type
assertion. Previously, this type assertion was configured such that a details of any type other than the expected would
result in a panic. At the moment, that will not occur because we only add details of one type. However, the whole point
of the type assertion is to support details of multiple types, and if other types are added a panic will not be the
appropriate behavior.
A better approach is to check the result of the type assertion, handling the non-nil status as a generic error if its
details are of a different type.
* Return nil on program action if an error occurred
* Refactoring 'upload' commands
* Refactoring 'board' commands
* Refactoring 'compile' commands
* Refactoring 'core' commands
* Refactoring 'debug' commands
* Refactoring 'lib' commands
* Refactoring 'sketch' commands
* Refactoring 'commands' commands
* updated tests and fixed some error wording
* fixed go lint warnings
* Apply suggestions from code review
Co-authored-by: per1234 <[email protected]>
* Apply changes from code review
Co-authored-by: Silvano Cerza <[email protected]>
* fix i18n
Co-authored-by: per1234 <[email protected]>
Co-authored-by: Silvano Cerza <[email protected]>
0 commit comments