Skip to content

Commit f4f2a02

Browse files
committed
cue: dig up wrapped error in valueError
Change-Id: Ic65285e5c54b59734da9d9a074416272c26cbe57 Reviewed-on: https://cue-review.googlesource.com/c/cue/+/7682 Reviewed-by: CUE cueckoo <[email protected]> Reviewed-by: Marcel van Lohuizen <[email protected]>
1 parent 03abe87 commit f4f2a02

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

cue/errors.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,13 @@ type valueError struct {
4141
err *bottom
4242
}
4343

44+
func (e *valueError) Unwrap() error {
45+
if e.err.Err == nil {
46+
return nil
47+
}
48+
return errors.Unwrap(e.err.Err)
49+
}
50+
4451
func (e *valueError) Bottom() *adt.Bottom { return e.err }
4552

4653
func (e *valueError) Error() string {

0 commit comments

Comments
 (0)