-
Notifications
You must be signed in to change notification settings - Fork 268
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
[core] Improve error messaging in getUpdateSql() / getInsertSql() #899
Comments
Change the calls using the constant in:
In the file
Any Ideas? |
Unless I am seriously missing something in the code, I don't think we can get a table name if the |
What exactly do we need here? I took it to mean:
This of course defeats the whole ending of the error message, I think I have the wrong idea, please clarify? |
I'm not really sure what @mnewnham had in mind when he opened this, but I agree with your assessment with regards to rs2html(). For getUpdateSql() / getInsertSql() at least we have the ADOConnection object available ($zthis parameter) so some extra information could be provided based on that. Hopefully he'll care to comment / explain. |
Correct, currently in my code I'm using
Yes please, once the driver parameter question and the |
Code Cleanup.
Code Cleanup.
Side Note. The |
Another thought I had around this as well. Using the rs2html function for example: if (!$rs) {
printf(ADODB_BAD_RS, 'Unknown', 'Unknown', 'rs2html');
return false;
}elseif (!$rs->connection) {
printf(ADODB_BAD_CX, $rs->dataProvider, $rs->tableName, 'rs2html');
return false;
} Of Course This idea is out of scope for Issue #899 . However, if this is something that would be useful in a future release, I could open an issue for it, and implement a solution for it in code fairly quickly. Thoughts? |
Yes of course ! Contributions are always welcome, feel free to send fixes and improvements via pull requests. Thank you very much !
It's not like anybody has ever complained about it over the last 15 years... But anyway I'm fine with that idea.
I'd rather avoid the
As mentioned before, contributions are welcome. Looking forward to the new issue and pull request 😃 |
I'll do that at some point and keep it separate from this issue. Thank you for the feedback. 😄 |
If @mnewnham does check in on this, I can always change the reference to |
Confirmed while working on a fix for #994 |
Current functionality
If an invalid statement is passed to
getInsertSql()
then a messageThe lack of information in the message makes debugging difficult, particularly if multiple connections are being used simultaneously. Improving the functionality would help.
Improved functionality
Default Message
Change the message to include a driver and table name
Debug Mode
Add message to
ADOConnection::outp()
The text was updated successfully, but these errors were encountered: