Skip to content
Draft
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/QueryReflection/MysqliQueryReflector.php
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,10 @@ public function getResultType(string $queryString, int $fetchType): ?Type
{
$result = $this->simulateQuery($queryString);
if (!\is_array($result)) {
if (QueryReflection::getRuntimeConfiguration()->isDebugEnabled() && $result instanceof mysqli_sql_exception) {
throw new UnresolvableQueryException(sprintf("Cannot simulate query\n %s \nbecause of a sql error: %s", $queryString, $result->getMessage()));
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

todo: separate exception type

}

return null;
}

Expand Down