Replaces EXCEPTION() with stack_trace() and CRASH()

This commit is contained in:
Ghommie
2020-03-05 01:47:04 +01:00
parent 7a539d0a78
commit bb7bfc04cc
18 changed files with 24 additions and 33 deletions
+1 -2
View File
@@ -23,8 +23,7 @@ GLOBAL_PROTECT(protected_ranks)
name = init_name
if(!name)
qdel(src)
throw EXCEPTION("Admin rank created without name.")
return
CRASH("Admin rank created without name.")
if(init_rights)
rights = init_rights
include_rights = rights
+2 -4
View File
@@ -39,12 +39,10 @@ GLOBAL_PROTECT(href_token)
return
if(!ckey)
QDEL_IN(src, 0)
throw EXCEPTION("Admin datum created without a ckey")
return
CRASH("Admin datum created without a ckey")
if(!istype(R))
QDEL_IN(src, 0)
throw EXCEPTION("Admin datum created without a rank")
return
CRASH("Admin datum created without a rank")
target = ckey
name = "[ckey]'s admin datum ([R])"
rank = R
@@ -303,8 +303,7 @@
/obj/structure/blob/proc/change_to(type, controller)
if(!ispath(type))
throw EXCEPTION("change_to(): invalid type for blob")
return
CRASH("change_to(): invalid type for blob")
var/obj/structure/blob/B = new type(src.loc, controller)
B.creation_action()
B.update_icon()
@@ -81,7 +81,7 @@
if(istype(our_target, /datum/cellular_emporium))
cellular_emporium = our_target
else
throw EXCEPTION("cellular_emporium action created with non emporium")
CRASH("cellular_emporium action created with non emporium")
/datum/action/innate/cellular_emporium/Activate()
cellular_emporium.ui_interact(owner)
+1 -1
View File
@@ -477,7 +477,7 @@ GLOBAL_LIST_INIT(devil_suffix, list(" the Red", " the Soulless", " the Master",
if(SOULVALUE >= ARCH_THRESHOLD && ascendable)
A.convert_to_archdevil()
else
throw EXCEPTION("Unable to find a blobstart landmark for hellish resurrection")
CRASH("Unable to find a blobstart landmark for hellish resurrection")
/datum/antagonist/devil/proc/update_hud()
@@ -144,7 +144,7 @@
for(var/i in 1 to device_type)
var/datum/pipeline/parent = parents[i]
if(!parent)
throw EXCEPTION("Component is missing a pipenet! Rebuilding...")
stack_trace("Component is missing a pipenet! Rebuilding...")
build_network()
parent.update = 1
@@ -23,7 +23,7 @@
return
template = SSmapping.shelter_templates[template_id]
if(!template)
throw EXCEPTION("Shelter template ([template_id]) not found!")
stack_trace("Shelter template ([template_id]) not found!")
qdel(src)
/obj/item/survivalcapsule/Destroy()
@@ -657,8 +657,7 @@ GLOBAL_LIST_EMPTY(allCasters)
var/mob/living/silicon/ai_user = user
scanned_user = "[ai_user.name] ([ai_user.job])"
else
throw EXCEPTION("Invalid user for this proc")
return
CRASH("Invalid user for this proc")
/obj/machinery/newscaster/proc/print_paper()
SSblackbox.record_feedback("amount", "newspapers_printed", 1)
+1 -1
View File
@@ -69,7 +69,7 @@ Contents:
Mind.add_antag_datum(ninjadatum)
if(Ninja.mind != Mind) //something has gone wrong!
throw EXCEPTION("Ninja created with incorrect mind")
stack_trace("Ninja created with incorrect mind")
spawned_mobs += Ninja
message_admins("[ADMIN_LOOKUPFLW(Ninja)] has been made into a ninja by an event.")
+1 -2
View File
@@ -570,8 +570,7 @@
else if (istype(W, /obj/item/stack/cable_coil) && opened)
var/turf/host_turf = get_turf(src)
if(!host_turf)
throw EXCEPTION("attackby on APC when it's not on a turf")
return
CRASH("attackby on APC when it's not on a turf")
if (host_turf.intact)
to_chat(user, "<span class='warning'>You must remove the floor plating in front of the APC first!</span>")
return
+3 -3
View File
@@ -78,12 +78,12 @@ in their list
/proc/list_to_object(var/list/data, var/loc)
if(!islist(data))
throw EXCEPTION("You didn't give me a list, bucko")
stack_trace("You didn't give me a list, bucko")
if(!("type" in data))
throw EXCEPTION("No 'type' field in the data")
stack_trace("No 'type' field in the data")
var/path = text2path(data["type"])
if(!path)
throw EXCEPTION("Path not found: [path]")
stack_trace("Path not found: [path]")
var/atom/movable/thing = new path(loc)
thing.deserialize(data)