mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 18:53:06 +00:00
Change VChat sqllite error message handler
This commit is contained in:
@@ -24,7 +24,7 @@ GLOBAL_DATUM(vchatdb, /database)
|
|||||||
//For INSERT/CREATE/DELETE, etc that return a RowsAffected.
|
//For INSERT/CREATE/DELETE, etc that return a RowsAffected.
|
||||||
/proc/vchat_exec_update(var/query)
|
/proc/vchat_exec_update(var/query)
|
||||||
if(!check_vchat())
|
if(!check_vchat())
|
||||||
log_debug("There's no vchat database open but you tried to query it with: [query]")
|
log_world("There's no vchat database open but you tried to query it with: [query]")
|
||||||
return FALSE
|
return FALSE
|
||||||
|
|
||||||
//Solidify our query
|
//Solidify our query
|
||||||
@@ -35,7 +35,7 @@ GLOBAL_DATUM(vchatdb, /database)
|
|||||||
|
|
||||||
//Handle errors
|
//Handle errors
|
||||||
if(q.Error())
|
if(q.Error())
|
||||||
log_debug("Query \"[islist(query)?query[1]:query]\" ended in error [q.ErrorMsg()]")
|
log_world("Query \"[islist(query)?query[1]:query]\" ended in error [q.ErrorMsg()]")
|
||||||
return FALSE
|
return FALSE
|
||||||
|
|
||||||
return q.RowsAffected()
|
return q.RowsAffected()
|
||||||
@@ -43,7 +43,7 @@ GLOBAL_DATUM(vchatdb, /database)
|
|||||||
//For SELECT, that return results.
|
//For SELECT, that return results.
|
||||||
/proc/vchat_exec_query(var/query)
|
/proc/vchat_exec_query(var/query)
|
||||||
if(!check_vchat())
|
if(!check_vchat())
|
||||||
log_debug("There's no vchat database open but you tried to query it!")
|
log_world("There's no vchat database open but you tried to query it!")
|
||||||
return FALSE
|
return FALSE
|
||||||
|
|
||||||
//Solidify our query
|
//Solidify our query
|
||||||
@@ -54,7 +54,7 @@ GLOBAL_DATUM(vchatdb, /database)
|
|||||||
|
|
||||||
//Handle errors
|
//Handle errors
|
||||||
if(q.Error())
|
if(q.Error())
|
||||||
log_debug("Query \"[islist(query)?query[1]:query]\" ended in error [q.ErrorMsg()]")
|
log_world("Query \"[islist(query)?query[1]:query]\" ended in error [q.ErrorMsg()]")
|
||||||
return FALSE
|
return FALSE
|
||||||
|
|
||||||
//Return any results
|
//Return any results
|
||||||
|
|||||||
Reference in New Issue
Block a user