From b69fe85134c881df2c033f7eb52ae75825924078 Mon Sep 17 00:00:00 2001 From: Aidan Matzko Date: Sun, 23 Feb 2014 15:30:33 -0500 Subject: [PATCH] Silly error names --- app/lib/world/world.coffee | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/lib/world/world.coffee b/app/lib/world/world.coffee index 98f04b529..87d6e3d9a 100644 --- a/app/lib/world/world.coffee +++ b/app/lib/world/world.coffee @@ -55,7 +55,7 @@ module.exports = class World @thangMap[thang.id] = thang thangDialogueSounds: -> - if @frames.length < @totalFrames then worldShouldBeOverBeforeGrabbingDialogue + if @frames.length < @totalFrames then throw new Error("World should be over before grabbing dialogue") [sounds, seen] = [[], {}] for frame in @frames for thangID, state of frame.thangStateMap @@ -245,7 +245,7 @@ module.exports = class World serialize: -> # Code hotspot; optimize it - if @frames.length < @totalFrames then worldShouldBeOverBeforeSerialization + if @frames.length < @totalFrames then throw new Error("World Should Be Over Before Serialization") [transferableObjects, nontransferableObjects] = [0, 0] o = {name: @name, totalFrames: @totalFrames, maxTotalFrames: @maxTotalFrames, frameRate: @frameRate, dt: @dt, victory: @victory, userCodeMap: {}, trackedProperties: {}} o.trackedProperties[prop] = @[prop] for prop in @trackedProperties or []