Skip to content

Make Errors more useful #189

Description

@JimLarson

Feature request checklist

  • There are no issues that match the desired change
  • The change is large enough it can't be addressed with a simple Pull Request
  • If this is a bug, please file a Bug Report.

Change

Have an Error method to obtain the raw offset (or range?) for the error, in addition to the line and column, to make it more useful when the caller embeds the CEL expression in a larger document and would like to translate errors back to the original context.

Furthermore, Error.ToDisplayString takes a Source argument, but in the case where Env.Parse() fails, we don't necessarily have an Ast to obtain the Source from, so you currently need to go outside the 'cel' package API in order to translate Issues into nice display strings.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions