Skip to content

Commit

Permalink
Handle exceptions thrown while converting JS return values
Browse files Browse the repository at this point in the history
  • Loading branch information
jyasskin committed Jun 22, 2023
1 parent 95f57dd commit c3b4e97
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -14186,7 +14186,8 @@ the special value “missing”, which represents a missing optional argument.
|callResult| and jump to the step labeled <a href="#call-user-object-operation-return"><i>return</i></a>.
1. Set |completion| to the result of [=converted to an IDL value|converting=]
|callResult|.\[[Value]] to an IDL value of the same type as the operation's
return type.
return type. If this throws an exception, set |completion| to the completion value
representing the thrown exception.
1. <i id="call-user-object-operation-return">Return:</i> at this
point |completion| will be set to an IDL value or an [=abrupt completion=].
1. [=Clean up after running a callback=] with |stored settings|.
Expand Down Expand Up @@ -14273,8 +14274,9 @@ described in the previous section).
1. If |callResult| is an [=abrupt completion=], set |completion| to
|callResult| and jump to the step labeled <a href="#invoke-return"><i>return</i></a>.
1. Set |completion| to the result of [=converted to an IDL value|converting=]
|callResult|.\[[Value]] to an IDL value of the same type as the operation's
return type.
|callResult|.\[[Value]] to an IDL value of the same type as |callable|'s
return type. If this throws an exception, set |completion| to the completion value
representing the thrown exception.
1. <i id="invoke-return">Return:</i> at this
point |completion| will be set to an IDL value or an [=abrupt completion=].
1. [=Clean up after running a callback=] with |stored settings|.
Expand Down Expand Up @@ -14315,8 +14317,9 @@ a return type that is a [=promise type=].
1. If |callResult| is an [=abrupt completion=], set |completion| to
|callResult| and jump to the step labeled <a href="#construct-return"><i>return</i></a>.
1. Set |completion| to the result of [=converted to an IDL value|converting=]
|callResult|.\[[Value]] to an IDL value of the same type as the operation's
return type.
|callResult|.\[[Value]] to an IDL value of the same type as |callable|'s
return type. If this throws an exception, set |completion| to the completion value
representing the thrown exception.
1. <i id="construct-return">Return:</i> at this
point |completion| will be set to an IDL value or an [=abrupt completion=].
1. [=Clean up after running a callback=] with |stored settings|.
Expand Down

0 comments on commit c3b4e97

Please sign in to comment.