Class SearchQueryError
Class that represents a query parsing error.
Namespace: UnityEditor.Search
Syntax
public class SearchQueryError
Constructors
SearchQueryError(Int32, Int32, String, SearchContext, SearchProvider, Boolean, SearchQueryErrorType)
Creates a new SearchQueryError.
Declaration
public SearchQueryError(int index, int length, string reason, SearchContext context, SearchProvider provider, bool fromSearchQuery = true, SearchQueryErrorType type = SearchQueryErrorType.Error)
Parameters
| Type | Name | Description |
|---|---|---|
| Int32 | index | Index where the error happened. |
| Int32 | length | Length of the block that was being parsed. |
| String | reason | What is the reason for the error. |
| SearchContext | context | The context on which this error was logged. |
| SearchProvider | provider | Which provider logged this error. |
| Boolean | fromSearchQuery | Set to true if this error comes from parsing the searchQuery. This will correctly offset the index with respect to the raw text. |
| SearchQueryErrorType | type | The type of this query error. |
Properties
context
The context on which this error was logged.
Declaration
public SearchContext context { get; }
Property Value
| Type | Description |
|---|---|
| SearchContext |
index
Index where the error happened.
Declaration
public int index { get; }
Property Value
| Type | Description |
|---|---|
| Int32 |
length
Length of the block that was being parsed.
Declaration
public int length { get; }
Property Value
| Type | Description |
|---|---|
| Int32 |
provider
Which provider logged this error.
Declaration
public SearchProvider provider { get; }
Property Value
| Type | Description |
|---|---|
| SearchProvider |
reason
What is the reason for the error.
Declaration
public string reason { get; }
Property Value
| Type | Description |
|---|---|
| String |
type
The type of this query error.
Declaration
public SearchQueryErrorType type { get; }
Property Value
| Type | Description |
|---|---|
| SearchQueryErrorType |
Methods
GetHashCode()
Get the hashcode of this error.
Declaration
public override int GetHashCode()
Returns
| Type | Description |
|---|---|
| Int32 | The hashcode of this error. |