# QueryError

> A QueryError holds the definition of a query parsing error.

## Definition

* **Type:** Class
* **Namespace:** [UnityEditor.Search](/engine/6000.7/script-reference/unityeditor/search.md)
* **Assembly:** UnityEditor

```csharp
public class QueryError
```

## Remarks

QueryErrors are obtained when parsing a query through the function QueryEngine.Parse. See [QueryEngine](/engine/6000.7/script-reference/unityeditor/search/queryengine1.md) for an example where we recover parsing errors when a query is invalid.

## Constructors

| Constructor                                                                                                                                               | Description                 |
| --------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------- |
| [QueryError()](/engine/6000.7/script-reference/unityeditor/search/queryerror/ctor.md#queryerror\(\))                                                      | Construct a new QueryError. |
| [QueryError(System.Int32,System.Int32,System.String)](/engine/6000.7/script-reference/unityeditor/search/queryerror/ctor.md#queryerror\(int-int-string\)) | Construct a new QueryError. |
| [QueryError(System.Int32,System.String)](/engine/6000.7/script-reference/unityeditor/search/queryerror/ctor.md#queryerror\(int-string\))                  | Construct a new QueryError. |

## Properties

| Property                                                                          | Description                                |
| --------------------------------------------------------------------------------- | ------------------------------------------ |
| [index](/engine/6000.7/script-reference/unityeditor/search/queryerror/index.md)   | Index where the error happened.            |
| [length](/engine/6000.7/script-reference/unityeditor/search/queryerror/length.md) | Length of the block that was being parsed. |
| [reason](/engine/6000.7/script-reference/unityeditor/search/queryerror/reason.md) | Reason why the parsing failed.             |
