Changeset

5209:f5d121846d53

mod_storage_sql: Return actual error string on commit failure.
author Waqas Hussain <waqas20@gmail.com>
date Fri, 30 Nov 2012 08:50:03 +0500
parents 5207:c5edb08fc7cb
children 5210:862a6fae05e7
files plugins/mod_storage_sql.lua
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/mod_storage_sql.lua	Thu Nov 29 07:38:00 2012 +0500
+++ b/plugins/mod_storage_sql.lua	Fri Nov 30 08:50:03 2012 +0500
@@ -228,7 +228,8 @@
 	return ...;
 end
 local function commit(...)
-	if not connection:commit() then return nil, "SQL commit failed"; end
+	local success,err = connection:commit();
+	if not success then return nil, "SQL commit failed: "..tostring(err); end
 	return ...;
 end