module.error
如果 module.status
为 'errored'
,则该属性包含模块在求值过程中抛出的异常。如果状态是别的,访问这个属性会导致抛出异常。
¥If the module.status
is 'errored'
, this property contains the exception
thrown by the module during evaluation. If the status is anything else,
accessing this property will result in a thrown exception.
值 undefined
不能用于由于可能与 throw undefined;
有歧义而没有抛出异常的情况。
¥The value undefined
cannot be used for cases where there is not a thrown
exception due to possible ambiguity with throw undefined;
.
对应 ECMAScript 规范中 循环模块记录 的 [[EvaluationError]]
字段。
¥Corresponds to the [[EvaluationError]]
field of Cyclic Module Records
in the ECMAScript specification.