mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-03-27 10:28:28 +00:00
Wrap VerifyError in ScriptException (#21769)
If a bug occurs in painless compilation (not from a user, but from the painless infrastructure), a VerifyError may be thrown when compiling the broken generated class. This commit wraps VerifyErrors in ScriptException so that useful information is returned to the user, which can be passed on to the ES team for analysis.
This commit is contained in:
parent
ba2d772668
commit
c3ec8e22b8
@ -172,7 +172,7 @@ public final class PainlessScriptEngineService extends AbstractComponent impleme
|
||||
}
|
||||
}, COMPILATION_CONTEXT);
|
||||
// Note that it is safe to catch any of the following errors since Painless is stateless.
|
||||
} catch (OutOfMemoryError | StackOverflowError | Exception e) {
|
||||
} catch (OutOfMemoryError | StackOverflowError | VerifyError | Exception e) {
|
||||
throw convertToScriptException(scriptName == null ? scriptSource : scriptName, scriptSource, e);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user