Class ParsingException

org.elasticsearch.ElasticsearchException
org.elasticsearch.common.ParsingException
All Implemented Interfaces:
, Writeable, org.elasticsearch.common.xcontent.ToXContent, org.elasticsearch.common.xcontent.ToXContentFragment

public class ParsingException extends ElasticsearchException
Exception that can be used when parsing queries with a given XContentParser. Can contain information about location of the error.
See Also:
Serialized Form
  • Field Details

  • Constructor Details

    • ParsingException

      public ParsingException(org.elasticsearch.common.xcontent.XContentLocation contentLocation,  msg, ... args)
    • ParsingException

      public ParsingException(org.elasticsearch.common.xcontent.XContentLocation contentLocation,  msg,  cause, ... args)
    • ParsingException

      public ParsingException(int line, int col,  msg,  cause)
      This constructor is provided for use in unit tests where a XContentParser may not be available
    • ParsingException

      public ParsingException(StreamInput in) throws
      Throws:
  • Method Details

    • getLineNumber

      public int getLineNumber()
      Line number of the location of the error
      Returns:
      the line number or -1 if unknown
    • getColumnNumber

      public int getColumnNumber()
      Column number of the location of the error
      Returns:
      the column number or -1 if unknown
    • status

      public RestStatus status()
      Description copied from class: ElasticsearchException
      Returns the rest status code associated with this exception.
      Overrides:
      status in class ElasticsearchException
    • metadataToXContent

      protected void metadataToXContent(org.elasticsearch.common.xcontent.XContentBuilder builder, org.elasticsearch.common.xcontent.ToXContent.Params params) throws
      Description copied from class: ElasticsearchException
      Renders additional per exception information into the XContent
      Overrides:
      metadataToXContent in class ElasticsearchException
      Throws:
    • writeTo

      public void writeTo(StreamOutput out) throws
      Description copied from interface: Writeable
      Write this into the StreamOutput.
      Specified by:
      writeTo in interface Writeable
      Overrides:
      writeTo in class ElasticsearchException
      Throws: