Class ScriptException

All Implemented Interfaces:
Serializable, Writeable, ToXContent, ToXContentFragment

public class ScriptException extends ElasticsearchException
Exception from a scripting engine.

A ScriptException has the following components:

  • message: A short and simple summary of what happened, such as "compile error".
  • cause: The underlying cause of the exception.
  • scriptStack: An implementation-specific "stacktrace" for the error in the script.
  • script: Identifier for which script failed.
  • lang: Scripting engine language, such as "painless"
See Also:
  • Constructor Details

    • ScriptException

      public ScriptException(String message, Throwable cause, List<String> scriptStack, String script, String lang, ScriptException.Position pos)
      Create a new ScriptException.
      Parameters:
      message - A short and simple summary of what happened, such as "compile error". Must not be null.
      cause - The underlying cause of the exception. Must not be null.
      scriptStack - An implementation-specific "stacktrace" for the error in the script. Must not be null, but can be empty (though this should be avoided if possible).
      script - Identifier for which script failed. Must not be null.
      lang - Scripting engine language, such as "painless". Must not be null.
      pos - Position of error within script, may be null.
      Throws:
      NullPointerException - if any parameters are null except pos.
    • ScriptException

      public ScriptException(String message, Throwable cause, List<String> scriptStack, String script, String lang)
      Create a new ScriptException with null Position.
    • ScriptException

      public ScriptException(StreamInput in) throws IOException
      Deserializes a ScriptException from a StreamInput
      Throws:
      IOException
  • Method Details