New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reflection should raise the proper Exception type when things are not found #38
Comments
This was introduced in 1b911f2 |
It looks like only |
Ah nice catch! Do you have the docs for this? |
There's the docs for the exception: http://docs.sqlalchemy.org/en/rel_1_0/core/exceptions.html?highlight=nosuchtableerror#sqlalchemy.exc.NoSuchTableError I'm looking for the usage docs (if any) right now. |
I don't see anything here explicitly stating what exceptions should be raised in the case of not finding tables: http://docs.sqlalchemy.org/en/rel_1_0/core/reflection.html I grepped through sqlalchemy core and found that indeed sybase, postgresql, and mysql all raise For other dialects I think the error is raised here (in the https://github.com/zzzeek/sqlalchemy/blob/master/lib/sqlalchemy/engine/reflection.py#L570-L571 |
Right now, when reflection fails, it's usually with a
KeyError
, but the other sqlalchemy dialects raisesa.exc.NoSuch<object>Error
. I have code that depends on this exception being raised, which is how I found this issue.I've got a PR in the works.
The text was updated successfully, but these errors were encountered: