From ef68fd24d52cb2a9ccaa1e74f9201aaa61b96b59 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki & Nathan Sobo Date: Wed, 6 Nov 2013 18:09:05 -0800 Subject: [PATCH] Log open exception stack to console --- src/root-view.coffee | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/src/root-view.coffee b/src/root-view.coffee index b482ef6b7..4d2ad289a 100644 --- a/src/root-view.coffee +++ b/src/root-view.coffee @@ -179,15 +179,18 @@ class RootView extends View editSession = activePane.itemForUri(project.relativize(filePath)) if activePane and filePath promise = project.open(filePath, {initialLine}) if not editSession - Q(editSession ? promise).then (editSession) => - if not activePane - activePane = new Pane(editSession) - @panes.setRoot(activePane) + Q(editSession ? promise) + .then (editSession) => + if not activePane + activePane = new Pane(editSession) + @panes.setRoot(activePane) - activePane.showItem(editSession) - activePane.focus() if changeFocus - @trigger "uri-opened" - editSession + activePane.showItem(editSession) + activePane.focus() if changeFocus + @trigger "uri-opened" + editSession + .catch (error) -> + console.error(error.stack ? error) # Private: Only used in specs openSync: (uri, {changeFocus, initialLine, pane, split}={}) ->