Skip to content

line number in painless compile error is incorrect #22827

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
PhaedrusTheGreek opened this issue Jan 27, 2017 · 2 comments
Closed

line number in painless compile error is incorrect #22827

PhaedrusTheGreek opened this issue Jan 27, 2017 · 2 comments
Assignees
Labels
:Core/Infra/Scripting Scripting abstractions, Painless, and Mustache >docs General docs changes

Comments

@PhaedrusTheGreek
Copy link
Contributor

Given some script with a compile problem:

void doSomething() {
 someVariable.push("asdf")
}

Only the following is included compile error - which doesn't have a correct line number:

Caused by: java.lang.IllegalArgumentException: Variable [someVariable] is not defined.
	at org.elasticsearch.painless.Executable$Script.compile(compile_me.painless:24) ~[?:?]
@jdconrad
Copy link
Contributor

We actually made the decision to make it character rather than line since that information is more helpful for most scripts since they are typically single lines. I thought this was documented, but it's not, so I'll add it to the list of things that need documentation.

@PhaedrusTheGreek
Copy link
Contributor Author

Character number is fantastic.

@clintongormley clintongormley added :Core/Infra/Scripting Scripting abstractions, Painless, and Mustache and removed :Plugin Lang Painless labels Feb 14, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Core/Infra/Scripting Scripting abstractions, Painless, and Mustache >docs General docs changes
Projects
None yet
Development

No branches or pull requests

3 participants