Skip to content

Commit dd6cf2a

Browse files
authored
Remove error constructor (#76)
It should not be possible to construct an `error` from WebAssembly's guest side. This isn't really useful to users (what can they do with it?) and thus extends the API surface unnecessarily. This change removes the `error` constructor, expecting that all wasi-nn errors will be constructed on the host side.
1 parent 917bf47 commit dd6cf2a

File tree

2 files changed

+0
-12
lines changed

2 files changed

+0
-12
lines changed

ml.md

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -138,16 +138,6 @@ e.g., cannot access a hardware feature requested
138138
<h4><a name="error"></a><code>resource error</code></h4>
139139
<hr />
140140
<h3>Functions</h3>
141-
<h4><a name="constructor_error"></a><code>[constructor]error: func</code></h4>
142-
<h5>Params</h5>
143-
<ul>
144-
<li><a name="constructor_error.code"></a><code>code</code>: <a href="#error_code"><a href="#error_code"><code>error-code</code></a></a></li>
145-
<li><a name="constructor_error.data"></a><code>data</code>: <code>string</code></li>
146-
</ul>
147-
<h5>Return values</h5>
148-
<ul>
149-
<li><a name="constructor_error.0"></a> own&lt;<a href="#error"><a href="#error"><code>error</code></a></a>&gt;</li>
150-
</ul>
151141
<h4><a name="method_error_code"></a><code>[method]error.code: func</code></h4>
152142
<p>Return the error code.</p>
153143
<h5>Params</h5>

wit/wasi-nn.wit

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,8 +157,6 @@ interface errors {
157157
}
158158

159159
resource error {
160-
constructor(code: error-code, data: string);
161-
162160
/// Return the error code.
163161
code: func() -> error-code;
164162

0 commit comments

Comments
 (0)