Skip to content

Commit 5453575

Browse files
committed
Quick path for handling $Failed symbol in formatting
1 parent 4ee2803 commit 5453575

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

mathicsscript/format.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
SymbolAborted,
1515
SymbolExport,
1616
SymbolExportString,
17+
SymbolFailed,
1718
SymbolFullForm,
1819
SymbolGraphics,
1920
SymbolGraphics3D,
@@ -165,6 +166,10 @@ def eval_boxes(result, fn: Callable, obj, **options):
165166
obj.out = ["$Aborted"]
166167
obj.last_eval = SymbolAborted
167168
return "$Aborted"
169+
elif expr is SymbolFailed:
170+
obj.out = ["$Failed"]
171+
obj.last_eval = SymbolFailed
172+
return "$Failed"
168173
if format == "text":
169174
if isinstance(expr, String):
170175
return expr.value

0 commit comments

Comments
 (0)