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
<!--
Copyright (C) 2020-2022 Arm Limited or its affiliates and Contributors.
All rights reserved.
SPDX-License-Identifier: Apache-2.0
-->
### Description
<!--
Please add any detail or context that would be useful to a reviewer.
-->
Add ErrFailed. This is useful because ErrUnexpected is used a lot as a
system error even when we are carrying out underlying tasks where a
failure isn't an error. This provides us another generic error but one
that we can use to distinguish between failures and system errors.
### Test Coverage
<!--
Please put an `x` in the correct box e.g. `[x]` to indicate the testing
coverage of this change.
-->
- [x] This change is covered by existing or additional automated tests.
- [ ] Manual testing has been performed (and evidence provided) as
automated testing was not feasible.
- [ ] Additional tests are not required for this change (e.g.
documentation update).
---------
Co-authored-by: Adrien CABARBAYE <adrien.cabarbaye@arm.com>
:sparkles: `commonerrors` Add ErrFailed to be used as a generic error where an error is an expected and valid state that should be distinguished from a system error
// WrapError wraps an error into a particular targetError. However, if the original error has to do with a contextual error (i.e. ErrCancelled or ErrTimeout), it will be passed through without having is type changed.
350
+
// WrapError wraps an error into a particular targetError. However, if the original error has to do with a contextual error (i.e. ErrCancelled or ErrTimeout) or should be considered as a failure rather than an error, it will be passed through without having its type changed.
351
+
// Same is true with warnings.
297
352
// This method should be used to safely wrap errors without losing information about context control information.
298
353
// If the target error is not set, the wrapped error will be of type ErrUnknown.
0 commit comments