Issues
Issues defines methods for inspecting the error details of environment parse and check calls.
Non-fatal warnings and notices may be exposed through this class in the future.
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new Issues(
options?):Issues
Creates an issue set around existing CEL diagnostics.
Parameters
Section titled “Parameters”options?
Section titled “options?”IssuesOptions = {}
Returns
Section titled “Returns”Issues
Methods
Section titled “Methods”append()
Section titled “append()”append(
other?):Issues
append combines another issue set into this one without duplicating itself.
Parameters
Section titled “Parameters”other?
Section titled “other?”Issues
Returns
Section titled “Returns”Issues
err():
Error|undefined
err returns an Error when the issue set contains one or more diagnostics.
Returns
Section titled “Returns”Error | undefined
errors()
Section titled “errors()”errors():
CommonError[]
errors returns the collection of diagnostics in granular form.
Returns
Section titled “Returns”getErrors()
Section titled “getErrors()”getErrors():
CommonError[]
getErrors exposes the underlying errors for compatibility with lower-level diagnostics.
Returns
Section titled “Returns”merge()
Section titled “merge()”merge(
other?):void
merge copies another issue set into this accumulator while preserving source locations.
Parameters
Section titled “Parameters”other?
Section titled “other?”Issues
Returns
Section titled “Returns”void
reportErrorAtId()
Section titled “reportErrorAtId()”reportErrorAtId(
options):void
reportErrorAtId attaches an error to an expression identifier when source metadata is present.
Parameters
Section titled “Parameters”options
Section titled “options”Returns
Section titled “Returns”void
toDisplayString()
Section titled “toDisplayString()”toDisplayString():
string
toDisplayString formats the issue set with source snippets and locations.
Returns
Section titled “Returns”string
toString()
Section titled “toString()”toString():
string
toString converts the issue set to a display-ready string.
Returns
Section titled “Returns”string