Skip to content

Conversation

ValentinAUCLERC
Copy link

Hello

I don't understand why the exception isn't returning "message" variable like everything does.
When trying to try/catch with a $e->getMessage() nothing appears.

I didn't understand why the sqlState is used, maybe if it's useful vars could be duplicated ?

@anesvetaevtrackad
Copy link

anesvetaevtrackad commented Aug 16, 2025

@ValentinAUCLERC
I join in to this PR
I think this is the reason why after update from 1.5.6 to 2.0.1 I stopped getting error strings in exceptions
It makes debugging harder

I get string like

Message: An exception occurred while executing a query:
File: /.../vendor/friendsofdoctrine/dbal-clickhouse/src/ClickHouseExceptionConverter.php

If I apply your code changes, I get correct error like, e.g.:

Message: An exception occurred while executing a query: Can`t find meta
File: /usr/local/codebase/vendor/friendsofdoctrine/dbal-clickhouse/src/ClickHouseExceptionConverter.php

It looks like a bug
Hope some of the maintainers will pay attention to this PR
@asanikovich could you please take a look?

Thank you in advance

@anesvetaevtrackad
Copy link

@mochalygin Hello
Could you please take a look at this PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants