ErrorAsIssues wraps a Golang error into a CEL common error and issue set. This is a convenience method for early returning from an expression validation call path due to internal state or configuration which is unrelated to the source being validated.
(err error)
| 970 | // This is a convenience method for early returning from an expression validation call path due to |
| 971 | // internal state or configuration which is unrelated to the source being validated. |
| 972 | func ErrorAsIssues(err error) *Issues { |
| 973 | errs := common.NewErrors(common.NewTextSource("")) |
| 974 | errs.ReportErrorString(common.NoLocation, err.Error()) |
| 975 | return NewIssues(errs) |
| 976 | } |
| 977 | |
| 978 | // NewIssues returns an Issues struct from a common.Errors object. |
| 979 | func NewIssues(errs *common.Errors) *Issues { |