-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsecureError.html
More file actions
70 lines (58 loc) · 2.46 KB
/
Copy pathsecureError.html
File metadata and controls
70 lines (58 loc) · 2.46 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
---
layout: default
---
<div class="content">
<h1>SecureError <span class="extends">extends <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error">Error</a></span></h1>
<p>This error is thrown by some methods when a security violation occurs.</p>
<p>See <a href="exceptions">Exceptions</a> and <a href="secure"><u>Secure</u></a> for more information.</p>
<h2>constructor</h2>
<article id="constructor">
<b class="constructor"></b>
<b class="server"></b>
<b class="client"></b>
<span class="sig">(opts: object | string)</span>
<p>If <u>opts</u> is a string, then it contains the <i>message</i> description of the problem. The <i>technical</i> will default to being <u>undefined</u>.
<p>If <u>opts</u> is an objec†, then:
<pre><code class="js">{
message: string; <i>// This message contains an end-user-facing error message that can be displayed in the UI.</i>
technical?: string; <i>// If present, this should contain additional technical information that would be relevant to a software developer.</i>
}
</code></pre>
</article>
<h2>instance</h2>
<article>
<b class="property"></b>
<b class="server"></b>
<b class="client"></b>
<span class="sig">message: string</span>
<p>This a description of the security violation.</p>
</article>
<article id="stack">
<b class="property"></b>
<b class="server"></b>
<b class="client"></b>
<span class="sig">stack?: string</span>
<p>This contains the stack trace if available.</p>
</article>
<article id="technical">
<b class="property"></b>
<b class="server"></b>
<b class="client"></b>
<span class="sig">technical?: string</span>
<p>If present, this should contain additional technical information that would be relevant to a software developer.</p>
</article>
<article id="toPlain">
<b class="method"></b>
<b class="server"></b>
<b class="client"></b>
<span class="sig">toPlain(): object</span>
<p>This returns a "Plain old JavaScript object" representation of this exception that is suitable for stringifying to JSON.</p>
</article>
<article>
<b class="method"></b>
<b class="server"></b>
<b class="client"></b>
<span class="sig">toString(): string</span>
<p>This returns <u>message</u>.</p>
</article>
</div>