Documentation Index
Fetch the complete documentation index at: https://docs.fiquela.io/llms.txt
Use this file to discover all available pages before exploring further.
Overview
Namespace:FQL\Exception
All FiQueLa exceptions extend either a standard PHP exception class or FQL\Exception\Exception (which itself extends \Exception). You can catch them by specific type or use the base classes to catch groups.
Base exception
Exception
File and I/O exceptions
FileNotFoundException
fromFile(), open(), or any stream factory cannot be found on the filesystem or is not readable.
Thrown by: Stream\Provider::fromFile(), Query\Provider::fromFile(), Csv::open(), and all other stream open() methods.
FileAlreadyExistsException
UnableOpenFileException
FileQueryException
fromFileQuery() and into()) is malformed or references a missing target file.
Thrown by: ResultsProvider::into(), Query\Provider::fromFileQuery().
Format and argument exceptions
InvalidFormatException
fromString() is called with an unsupported format. Also thrown for invalid CSV parameters (bad delimiter, unsupported encoding, etc.).
Thrown by: Format::fromExtension(), Stream\Provider::fromFile(), Stream\Provider::fromString(), Format::fromString().
InvalidArgumentException
Operator::fromOrFail(), or providing a non-scalar BETWEEN range.
UnexpectedValueException
WHERE or HAVING conditions.
Query construction exceptions
These exceptions are thrown during query building (beforeexecute() is called).
QueryLogicException
- Using
DISTINCTtogether withGROUP BY. - Using
GROUP BYtogether withDISTINCT. - Using
UNIONwith mismatched column counts between the main query and a union query.
SelectException
SELECT:. Thrown when:
- A field is selected more than once with
select(). - A
modulo()division produces an unexpected value.
AliasException
AS:. Thrown when as() is called with:
- An empty alias string.
- An alias that is already used.
- No preceding selected field to alias.
- A field that was already aliased.
JoinException
JOIN:. Thrown when:
- A join is added with an empty alias.
on()is called without a preceding join.
OrderByException
ORDER BY:. Thrown when:
- The same field is added to
orderBy()twice. asc()ordesc()is called when no ordering has been set.
SortException
ORDER BY:. Thrown by the sort execution phase when an unexpected error occurs while sorting the result set.
CaseException
CASE:. Thrown when the CASE expression builder methods are called out of order:
whenCase()without a precedingcase().elseCase()without a precedingcase()orwhenCase().elseCase()called twice.endCase()without a precedingcase().
Runtime exceptions
NotImplementedException
callable and generates a descriptive message like "Static method FQL\Stream\Csv::string not implemented yet."
Currently thrown by Csv::string() (creating a CSV stream from a string is not supported).
SQL parser and function registry exceptions
These exceptions were introduced in FiQueLa 3.0 alongside the new SQL pipeline andFunctionRegistry.
ParseException
Sql\Provider::compile(), parseExpression(), parseCondition(), and Query\Provider::fql() when an FQL string is syntactically invalid. The exception carries the offending token and its line/column information so callers can surface precise error locations.
UnknownFunctionException
FunctionRegistry. Register the function with FunctionRegistry::register(MyFn::class) at bootstrap before running the query.
FunctionRegistrationException
FunctionRegistry::register(), override(), unregister(), and loadConfig() when a registration cannot be completed — for example, registering a class that does not implement ScalarFunction or AggregateFunction, or attempting to register a name that already exists without using override().
See Custom functions for the full registry API.