@@ -87,14 +87,21 @@ module.exports =
87
87
code : code
88
88
row : 1
89
89
column : 1
90
- getmodule (data).then (mod) =>
91
- evalall ({
92
- path : path
93
- module : modules .current mod
94
- code : code
95
- }).then (result) ->
96
- notifications .show " Evaluation Finished"
97
- workspace .update ()
90
+ getmodule (data)
91
+ .then (mod) =>
92
+ evalall ({
93
+ path : path
94
+ module : modules .current mod
95
+ code : code
96
+ })
97
+ .then (result) ->
98
+ notifications .show " Evaluation Finished"
99
+ workspace .update ()
100
+ .catch (err) =>
101
+ console .log (err)
102
+ .catch (err) =>
103
+ console .log (err)
104
+
98
105
catch error
99
106
atom .notifications .addError ' Error happened' ,
100
107
detail : error
@@ -110,9 +117,12 @@ module.exports =
110
117
path : edpath
111
118
module : module
112
119
code : code
113
- }).then (result) ->
114
- notifications .show " Evaluation Finished"
115
- workspace .update ()
120
+ })
121
+ .then (result) ->
122
+ notifications .show " Evaluation Finished"
123
+ workspace .update ()
124
+ .catch (err) =>
125
+ console .log (err)
116
126
117
127
toggleDocs : () ->
118
128
{ editor , mod , edpath } = @ _currentContext ()
@@ -123,18 +133,21 @@ module.exports =
123
133
word = editor .getTextInBufferRange (range)
124
134
125
135
return unless words .isValidWordToInspect (word)
126
- searchDoc ({word : word, mod : mod}).then (result) =>
127
- if result .error then return
128
- v = views .render result
129
- processLinks (v .getElementsByTagName (' a' ))
130
- if atom .config .get (' julia-client.uiOptions.docsDisplayMode' ) == ' inline'
131
- d = new @ink .InlineDoc editor, range,
132
- content : v
133
- highlight : true
134
- d .view .classList .add ' julia'
135
- else
136
- docpane .ensureVisible ()
137
- docpane .showDocument (v, [])
136
+ searchDoc ({word : word, mod : mod})
137
+ .then (result) =>
138
+ if result .error then return
139
+ v = views .render result
140
+ processLinks (v .getElementsByTagName (' a' ))
141
+ if atom .config .get (' julia-client.uiOptions.docsDisplayMode' ) == ' inline'
142
+ d = new @ink .InlineDoc editor, range,
143
+ content : v
144
+ highlight : true
145
+ d .view .classList .add ' julia'
146
+ else
147
+ docpane .ensureVisible ()
148
+ docpane .showDocument (v, [])
149
+ .catch (err) =>
150
+ console .log (err)
138
151
139
152
# Working Directory
140
153
@@ -177,9 +190,12 @@ module.exports =
177
190
else if dirs .length == 1
178
191
@ _cd dirs[0 ]
179
192
else
180
- selector .show (dirs).then (dir) =>
181
- return unless dir?
182
- @ _cd dir
193
+ selector .show (dirs)
194
+ .then (dir) =>
195
+ return unless dir?
196
+ @ _cd dir
197
+ .catch (err) =>
198
+ console .log (err)
183
199
184
200
cdHome : ->
185
201
@ _cd paths .home ()
0 commit comments