|
4 | 4 | <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/8.4/styles/github.min.css">
|
5 | 5 | <script src="./spec.js"></script>
|
6 | 6 | <pre class="metadata">
|
7 |
| -title: Proposal Title Goes Here |
8 |
| -stage: -1 |
9 |
| -contributors: Your Name(s) Here |
| 7 | +title: Error.captureStackTrace |
| 8 | +stage: 1 |
| 9 | +contributors: Daniel Minor |
| 10 | +markEffects: true |
10 | 11 | </pre>
|
11 | 12 |
|
12 |
| -<emu-clause id="sec-demo-clause"> |
13 |
| - <h1>This is an emu-clause</h1> |
14 |
| - <p>This is an algorithm:</p> |
15 |
| - <emu-alg> |
16 |
| - 1. Let _proposal_ be *undefined*. |
17 |
| - 1. If IsAccepted(_proposal_) is *true*, then |
18 |
| - 1. Let _stage_ be *0*<sub>ℤ</sub>. |
19 |
| - 1. Else, |
20 |
| - 1. Let _stage_ be *-1*<sub>ℤ</sub>. |
21 |
| - 1. Return ? ToString(_stage_). |
22 |
| - </emu-alg> |
23 |
| -</emu-clause> |
| 13 | +<emu-intro id="intro"> |
| 14 | + <h1>Introduction</h1> |
| 15 | + <p></p> |
| 16 | +</emu-intro> |
| 17 | + |
| 18 | +<emu-clause id="sec-fundamental-objects" number="20"> |
| 19 | + <h1>Fundamental Objects</h1> |
| 20 | + |
| 21 | + <emu-clause id="sec-error-objects" number="5"> |
| 22 | + <h1>Error Objects</h1> |
| 23 | + |
| 24 | + <emu-clause id="sec-properties-of-the-error-constructor" number="2"> |
| 25 | + <h1>Properties of the Error Constructor</h1> |
24 | 26 |
|
25 |
| -<emu-clause id="sec-is-accepted" type="abstract operation"> |
26 |
| - <h1> |
27 |
| - IsAccepted ( |
28 |
| - _proposal_: an ECMAScript language value |
29 |
| - ): a Boolean |
30 |
| - </h1> |
31 |
| - <dl class="header"> |
32 |
| - <dt>description</dt> |
33 |
| - <dd>Tells you if the proposal was accepted</dd> |
34 |
| - </dl> |
35 |
| - <emu-alg> |
36 |
| - 1. If _proposal_ is not a String, or is not accepted, return *false*. |
37 |
| - 1. Return *true*. |
38 |
| - </emu-alg> |
| 27 | + <emu-clause id="sec-error.capturestacktrace"> |
| 28 | + <h1>Error.captureStackTrace ( _error_ [ , _constructor_ ])</h1> |
| 29 | + <emu-alg> |
| 30 | + 1. If _error_ is not an Object, throw a *TypeError* exception. |
| 31 | + 1. If _constructor_ is not *undefined*, then |
| 32 | + 1. If IsCallable(_constructor_) is *false*, throw a *TypeError* exception. |
| 33 | + 1. TODO: No implementations currently check that _constructor_ is callable, this may not be web compatible. |
| 34 | + 1. If IsCallable(_constructor_) is *true*, then |
| 35 | + 1. Let _string_ be an implementation-defined string that represents the current stack trace, with all stack |
| 36 | + frames above the topmost call to _constructor_, including that call, omitted from the stack trace. |
| 37 | + 1. NOTE: This can be used to hide implementation details on the stack trace that aren't useful to user. |
| 38 | + 1. Else, |
| 39 | + 1. Let _string_ be an implementation-defined string that represents the current stack trace. |
| 40 | + 1. Perform ? SetterThatIgnoresPrototypeProperties(*this* value, _error_, *"stack"*, _string_). |
| 41 | + 1. Return *undefined*. |
| 42 | + </emu-alg> |
| 43 | + </emu-clause> |
| 44 | + </emu-clause> |
| 45 | + </emu-clause> |
39 | 46 | </emu-clause>
|
0 commit comments