trilogy-libraries / trilogy

Trilogy is a client library for MySQL-compatible database servers, designed for performance, flexibility, and ease of embedding.
MIT License
697 stars 68 forks source link

Add rbmsg back to TRILOGY_ERR #187

Closed skipkayhil closed 1 month ago

skipkayhil commented 3 months ago

This was previously removed when error classes were refactored, but it doesn't seem to have been done so intentionally.

When debugging a previous fix, this missing context would have helped narrow down the problem initially as the rbmsg includes where the error was originating.

skipkayhil commented 3 months ago

I'm also curious if these lines in auth_switch should be changed to trilogy_auth_switch_recv

https://github.com/trilogy-libraries/trilogy/blob/004d02a638ba8cd69933feaee8808b72a7c97451/contrib/ruby/ext/trilogy-ruby/cext.c#L376-L381

While there is no trilogy_auth_switch_recv method, making the rbmsg here different than the one in authenticate would also be helpful for tracking down the line raising an error.