ErrorBox

ErrorBox[boxes]
is a low-level box construct that represents boxes that cannot be interpreted in input or output.

更多信息更多信息

  • ErrorBox[boxes] typically displays as the raw form of boxes together with underlining that indicates parts that cannot be interpreted.
  • An explicit ErrorBox is typically generated by a failed call to MakeExpression.
  • When the front end reads an invalid box structure from a Notebook or Cell expression, it generates an implicit ErrorBox, but it preserves the original structure when the expression is written out.
  • ErrorBox is displayed as a pink box. The pink box may have a tooltip or contents that help to indicate the nature of the error.

范例范例打开所有单元关闭所有单元

基本范例  (2)基本范例  (2)

MakeExpression generates ErrorBox structure when incomplete syntax is detected:

In[1]:=
Click for copyable input
Out[1]=

Displaying the ErrorBox shows a pink box:

In[2]:=
Click for copyable input
Out[2]=

An invalid box argument may generate an ErrorBox:

In[1]:=
Click for copyable input
Out[1]=
1996年引入
(3.0)