mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2025-12-29 19:42:42 +00:00
News Controller Hotfix
Better error logging, should a query fail.
This commit is contained in:
@@ -37,6 +37,7 @@ var/global/datum/news_controller/news_controller
|
||||
update_query.Execute()
|
||||
|
||||
if(update_query.ErrorMsg())
|
||||
error("SQL database query encountered an error: [update_query.ErrorMsg()].")
|
||||
fails++
|
||||
return
|
||||
|
||||
@@ -61,6 +62,11 @@ var/global/datum/news_controller/news_controller
|
||||
var/DBQuery/publish_query = dbcon.NewQuery("SELECT channel, author, body FROM ss13_news WHERE id=[article_id]")
|
||||
publish_query.Execute()
|
||||
|
||||
if(publish_query.ErrorMsg())
|
||||
error("SQL database query encountered an error: [publish_query.ErrorMsg()].")
|
||||
fails++
|
||||
return
|
||||
|
||||
var/article_channel
|
||||
var/article_author
|
||||
var/article_content
|
||||
|
||||
Reference in New Issue
Block a user