Class SearchQueryError
Class that represents a query parsing error.
Inherited Members
Namespace: UnityEditor.Search
Assembly: com.unity.quicksearch.dll
Syntax
public class SearchQueryError
Constructors
SearchQueryError(int, int, string, SearchContext, SearchProvider, bool, 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 |
|---|---|---|
| int | index | Index where the error happened. |
| int | 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. |
| bool | 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. |
SearchQueryError(QueryError, SearchContext, SearchProvider, bool)
Declaration
public SearchQueryError(QueryError error, SearchContext context, SearchProvider provider, bool fromSearchQuery = true)
Parameters
| Type | Name | Description |
|---|---|---|
| QueryError | error | |
| SearchContext | context | |
| SearchProvider | provider | |
| bool | fromSearchQuery |
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 |
|---|---|
| int |
length
Length of the block that was being parsed.
Declaration
public int length { get; }
Property Value
| Type | Description |
|---|---|
| int |
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 |
|---|---|
| int | The hashcode of this error. |