mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-02-06 06:28:46 +00:00
Store Cargo Load Errors in the DB (#9466)
* Store Cargo Load Errors in the DB * Bump SQL Version number * Remove displaying db save errors (Already handled by Execute) Co-authored-by: Werner <Arrow768@users.noreply.github.com>
This commit is contained in:
6
SQL/migrate/V055__cargo_db_errors.sql
Normal file
6
SQL/migrate/V055__cargo_db_errors.sql
Normal file
@@ -0,0 +1,6 @@
|
||||
--
|
||||
-- Adds a column to ss13_cargo_items which enables the storage of load errors
|
||||
--
|
||||
|
||||
ALTER TABLE `ss13_cargo_items`
|
||||
ADD COLUMN `error_message` TEXT NULL DEFAULT NULL AFTER `order_by`;
|
||||
@@ -167,6 +167,9 @@ var/datum/controller/subsystem/cargo/SScargo
|
||||
item_query.item[11])
|
||||
catch(var/exception/ei)
|
||||
log_debug("SScargo: Error when loading item [item_id] from sql: [ei]")
|
||||
var/DBQuery/item_error_query = dbcon.NewQuery("UPDATE ss13_cargo_items SET load_error = :error_message: WHERE id = :id:")
|
||||
item_error_query.Execute(list("id"=item_id,"error_message"="[ei]"))
|
||||
|
||||
|
||||
//Loads the cargo data from JSON
|
||||
/datum/controller/subsystem/cargo/proc/load_from_json()
|
||||
|
||||
Reference in New Issue
Block a user