pub(crate) fn apply_error_cause(err: &Value, options: &Value) -> ValueExpand description
new Error(msg, {cause})(ES2022 のエラーオプション。原因となった別の例外を連鎖させる
定番イディオム catch(e){ throw new Error('wrap', {cause: e}) } で使われる)。
options が cause プロパティを(値に関わらず)持つ場合のみ err.cause を設定する
(in 相当。cause キー自体が無ければ設定しない、が仕様上の挙動)。