Skip to content

Commit

Permalink
sqlite error debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
GlorifiedPig committed May 25, 2020
1 parent f06ad2b commit 5879a8b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lua/glorifiedbanking/libraries/sv_glorifiedbanking_sql.lua
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,12 @@ function GlorifiedBanking.SQL.Query( sqlQuery, successFunc )
query:start()
else
local queryData = sql.Query( sqlQuery )
if queryData == false then
if sql.LastError() then
GlorifiedBanking.SQL.ThrowError( sql.LastError() )
end
return
end
if successFunc then successFunc( queryData ) end
end
end
Expand Down

0 comments on commit 5879a8b

Please sign in to comment.