vastorbit.errors.QueryError¶
- exception vastorbit.errors.QueryError¶
An exception raised when an error occurs during the execution of a query. This error typically indicates issues such as syntax errors, invalid queries, or problems with the underlying data structure, preventing the successful execution of the query.
Examples
The following function checks if the query includes a ‘SELECT’ statement.
from vastorbit.errors import QueryError def include_select(query: str): if 'SELECT ' not in query.upper(): raise QueryError( "The query must include a 'SELECT' statement." )
Note
Errors can be employed when implementing new functions to provide clear explanations for why a particular option or feature is not functioning as intended. It is essential to review all available errors to choose the most appropriate one.