OpenSearch/modules/lang-painless
Stuart Tettemer 41c15b438d
Scripting: Add char position of script errors (#51069) (#51266)
Add the character position of a scripting error to error responses.

The contents of the `position` field are experimental and subject to
change.  Currently, `offset` refers to the character location where the
error was encountered, `start` and `end` define a range of characters
that contain the error.

eg.
```
{
  "error": {
    "root_cause": [
      {
        "type": "script_exception",
        "reason": "runtime error",
        "script_stack": [
          "y = x;",
          "     ^---- HERE"
        ],
        "script": "def x = new ArrayList(); Map y = x;",
        "lang": "painless",
        "position": {
          "offset": 33,
          "start": 29,
          "end": 35
        }
      }
```

Refs: #50993
2020-01-21 13:45:59 -07:00
..
licenses Painless: Upgrade ASM to 7.2 (#49263) 2019-11-20 07:09:47 -08:00
spi Scripting: Cache script results if deterministic (#50106) (#50329) 2019-12-18 13:00:42 -07:00
src Scripting: Add char position of script errors (#51069) (#51266) 2020-01-21 13:45:59 -07:00
build.gradle Painless: Upgrade ASM to 7.2 (#49263) 2019-11-20 07:09:47 -08:00