Skip to content

Commit

Permalink
cue: dig up wrapped error in valueError
Browse files Browse the repository at this point in the history
Change-Id: Ic65285e5c54b59734da9d9a074416272c26cbe57
Reviewed-on: https://cue-review.googlesource.com/c/cue/+/7682
Reviewed-by: CUE cueckoo <cueckoo@gmail.com>
Reviewed-by: Marcel van Lohuizen <mpvl@golang.org>
  • Loading branch information
mpvl committed Nov 18, 2020
1 parent 03abe87 commit f4f2a02
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions cue/errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,13 @@ type valueError struct {
err *bottom
}

func (e *valueError) Unwrap() error {
if e.err.Err == nil {
return nil
}
return errors.Unwrap(e.err.Err)
}

func (e *valueError) Bottom() *adt.Bottom { return e.err }

func (e *valueError) Error() string {
Expand Down

0 comments on commit f4f2a02

Please sign in to comment.