Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
65 changes: 36 additions & 29 deletions spec.emu
Original file line number Diff line number Diff line change
Expand Up @@ -4,36 +4,43 @@
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/8.4/styles/github.min.css">
<script src="./spec.js"></script>
<pre class="metadata">
title: Proposal Title Goes Here
stage: -1
contributors: Your Name(s) Here
title: Error.captureStackTrace
stage: 1
contributors: Daniel Minor
markEffects: true
</pre>

<emu-clause id="sec-demo-clause">
<h1>This is an emu-clause</h1>
<p>This is an algorithm:</p>
<emu-alg>
1. Let _proposal_ be *undefined*.
1. If IsAccepted(_proposal_) is *true*, then
1. Let _stage_ be *0*<sub>ℤ</sub>.
1. Else,
1. Let _stage_ be *-1*<sub>ℤ</sub>.
1. Return ? ToString(_stage_).
</emu-alg>
</emu-clause>
<emu-intro id="intro">
<h1>Introduction</h1>
<p></p>
</emu-intro>

<emu-clause id="sec-fundamental-objects" number="20">
<h1>Fundamental Objects</h1>

<emu-clause id="sec-error-objects" number="5">
<h1>Error Objects</h1>

<emu-clause id="sec-properties-of-the-error-constructor" number="2">
<h1>Properties of the Error Constructor</h1>

<emu-clause id="sec-is-accepted" type="abstract operation">
<h1>
IsAccepted (
_proposal_: an ECMAScript language value
): a Boolean
</h1>
<dl class="header">
<dt>description</dt>
<dd>Tells you if the proposal was accepted</dd>
</dl>
<emu-alg>
1. If _proposal_ is not a String, or is not accepted, return *false*.
1. Return *true*.
</emu-alg>
<emu-clause id="sec-error.capturestacktrace">
<h1>Error.captureStackTrace ( _error_ [ , _constructor_ ])</h1>
<emu-alg>
1. If _error_ is not an Object, throw a *TypeError* exception.
1. If _constructor_ is not *undefined*, then
1. If IsCallable(_constructor_) is *false*, throw a *TypeError* exception.
1. TODO: No implementations currently check that _constructor_ is callable, this may not be web compatible.
1. If IsCallable(_constructor_) is *true*, then
1. Let _string_ be an implementation-defined string that represents the current stack trace, with all stack
frames above the topmost call to _constructor_, including that call, omitted from the stack trace.
1. NOTE: This can be used to hide implementation details on the stack trace that aren't useful to user.
1. Else,
1. Let _string_ be an implementation-defined string that represents the current stack trace.
1. Perform ? SetterThatIgnoresPrototypeProperties(*this* value, _error_, *"stack"*, _string_).
1. Return *undefined*.
</emu-alg>
</emu-clause>
</emu-clause>
</emu-clause>
</emu-clause>