From 5879a8b1c0aebb908b297f6f16f287e0931d48c4 Mon Sep 17 00:00:00 2001 From: GlorifiedPig Date: Mon, 25 May 2020 11:25:38 +0200 Subject: [PATCH] sqlite error debugging --- lua/glorifiedbanking/libraries/sv_glorifiedbanking_sql.lua | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lua/glorifiedbanking/libraries/sv_glorifiedbanking_sql.lua b/lua/glorifiedbanking/libraries/sv_glorifiedbanking_sql.lua index 1012c78..6443b60 100644 --- a/lua/glorifiedbanking/libraries/sv_glorifiedbanking_sql.lua +++ b/lua/glorifiedbanking/libraries/sv_glorifiedbanking_sql.lua @@ -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