From c3573b2fbd2eeb3ce9c06292acc69193521b9d33 Mon Sep 17 00:00:00 2001 From: Nick Winter Date: Tue, 16 Sep 2014 15:22:49 -0700 Subject: [PATCH] Adding more error handling for George's inventory saving problems. --- app/models/CocoModel.coffee | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/models/CocoModel.coffee b/app/models/CocoModel.coffee index 5d1770c45..0b6f58289 100644 --- a/app/models/CocoModel.coffee +++ b/app/models/CocoModel.coffee @@ -126,7 +126,10 @@ class CocoModel extends Backbone.Model return unless @notyErrors errorMessage = "Error saving #{@get('name') ? @type()}" console.error errorMessage, res.responseJSON - noty text: "#{errorMessage}: #{res.status} #{res.statusText}", layout: 'topCenter', type: 'error', killer: false, timeout: 10000 + try + noty text: "#{errorMessage}: #{res.status} #{res.statusText}", layout: 'topCenter', type: 'error', killer: false, timeout: 10000 + catch notyError + console.error "Couldn't even show noty error for", error, "because", notyError @trigger 'save', @ return super attrs, options