wyozi / fruitydb

A MeekroDB like abstraction for Garry's Mod's MysqlOO/tmysql4/SQLite
3 stars 2 forks source link

Improve error reporting #13

Open wyozi opened 9 years ago

wyozi commented 9 years ago

addons/fruitydb/lua/dbtypes/mysqloo.lua:63: attempt to index local 'query' (a nil value) should not happen

wyozi commented 9 years ago

Although query should always return the query object (?)

wyozi commented 9 years ago

This is caused by mysqloo connection failing but the failure not being reported properly. https://github.com/wyozi/fruitydb/blob/master/lua/dbtypes/mysqloo.lua#L51

Seems like self:IsConnected() is true even if connection fails. Check for existence of err string instead?