Skip to content

Commit 702e0d7

Browse files
sn6uvlieblb
authored andcommitted
cleanup evaluation.error -> evaluation.message
1 parent 6a698fb commit 702e0d7

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

mathics/builtin/manipulate.py

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -262,17 +262,15 @@ def apply(self, expr, args, evaluation):
262262
if not instantiator.add(arg, evaluation): # not a valid argument pattern?
263263
return
264264
except IllegalWidgetArguments as e:
265-
evaluation.error('Manipulate', 'widgetargs', strip_context(str(e.var)))
265+
return evaluation.message('Manipulate', 'widgetargs', strip_context(str(e.var)))
266266
except JupyterWidgetError as e:
267-
evaluation.error('Manipulate', 'widgetmake', e.err)
268-
return Symbol('$Aborted')
267+
return evaluation.message('Manipulate', 'widgetmake', e.err)
269268

270269
clear_output_callback = evaluation.clear_output_callback
271270
display_data_callback = evaluation.display_data_callback # for pushing updates
272271

273272
if clear_output_callback is None or display_data_callback is None:
274-
evaluation.error('Manipulate', 'imathics')
275-
return Symbol('$Aborted')
273+
return evaluation.message('Manipulate', 'imathics')
276274

277275
def callback(**kwargs):
278276
clear_output_callback(wait=True)
@@ -293,7 +291,6 @@ def callback(**kwargs):
293291
box = _interactive(instantiator.build_callback(callback), widgets) # create the widget
294292
formatter = IPythonDisplayFormatter()
295293
if not formatter(box): # make the widget appear on the Jupyter notebook
296-
evaluation.error('Manipulate', 'widgetdisp')
297-
return Symbol('$Aborted')
294+
return evaluation.message('Manipulate', 'widgetdisp')
298295

299296
return Symbol('Null') # the interactive output is pushed via kernel.display_data_callback (see above)

0 commit comments

Comments
 (0)