From 10653c12fdec44dd3755c35db8c36243c2afb632 Mon Sep 17 00:00:00 2001 From: James Allen Date: Wed, 7 Jan 2015 13:12:00 +0000 Subject: [PATCH] Send more data to Sentry to track down error --- .../ide/editor/directives/aceEditor/undo/UndoManager.coffee | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/services/web/public/coffee/ide/editor/directives/aceEditor/undo/UndoManager.coffee b/services/web/public/coffee/ide/editor/directives/aceEditor/undo/UndoManager.coffee index d30e2f6718..c57f1dffa4 100644 --- a/services/web/public/coffee/ide/editor/directives/aceEditor/undo/UndoManager.coffee +++ b/services/web/public/coffee/ide/editor/directives/aceEditor/undo/UndoManager.coffee @@ -230,6 +230,8 @@ define [ } _aceDeltaToSimpleDelta: (aceDelta, docLines) -> + if !aceDelta.range? + Raven?.captureException(new Error("Missing range in aceDelta"), { delta: aceDelta }) start = aceDelta.range.start linesBefore = docLines.slice(0, start.row) position = @@ -258,7 +260,7 @@ define [ remove: aceDelta.lines.join("\n") + "\n" } else - throw "Unknown Ace action: #{aceDelta.action}" + throw new Error("Unknown Ace action: #{aceDelta.action}") _simplePositionToAcePosition: (position, docLines) -> column = 0