• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Utils Error Codes
2
3> **NOTE**
4>
5> This topic describes only module-specific error codes. For details about universal error codes, see [Universal Error Codes](errorcode-universal.md).
6
7## 10200001 Value Out of Range
8
9**Error Message**
10
11The value of ${param} is out of range.
12
13**Description**
14
15The value of a parameter passed in the API exceeds the valid range.
16
17**Possible Causes**
18
19The parameter value exceeds the value range.
20
21**Solution**
22
23Use a valid parameter value.
24
25## 10200002 Parameter Parsing Error
26
27**Error Message**
28
29Invalid ${param} string.
30
31**Description**
32
33Failed to parse a string.
34
35**Possible Causes**
36
37A parameter of the string type passed in the API is a non-standard string. As a result, the string fails to be parsed.
38
39**Solution**
40
41Check the format of the string.
42
43## 10200003 Failed to Initialize the Worker Instance
44
45**Error Message**
46
47Worker initialization failure.
48
49**Description**
50
51The **Worker** instance fails to be initialized when the API is called.
52
53**Possible Causes**
54
551. The number of **Worker** instances to be created exceeds the upper limit.
562. The options for setting the **Worker** instance are incorrect.
57
58**Solution**
59
601. Check whether the number of **Worker** instances exceeds 8. If yes, destroy idle **Worker** instances.
612. If **WorkerOptions** is set, check the parameter type and validity.
62
63## 10200004 Worker Instance Is Not Running
64
65**Error Message**
66
67Worker instance is not running.
68
69**Description**
70
71The **Worker** instance is not running when the API is called.
72
73**Possible Causes**
74
75When the API is called, the **Worker** instance has been destroyed or is being destroyed.
76
77**Solution**
78
79Ensure that the **Worker** instance is running properly.
80
81## 10200005 Worker Thread Does Not Support an API
82
83**Error Message**
84
85The invoked API is not supported in workers.
86
87**Description**
88
89An API that is not supported by the worker thread is called.
90
91**Possible Causes**
92
93The worker thread does not support the API.
94
95**Solution**
96
97Use a supported API.
98
99## 10200006 Worker Transmission Information Serialization Exception
100
101**Error Message**
102
103Serializing an uncaught exception failed.
104
105**Description**
106
107An error occurs when serializing transmission information.
108
109**Possible Causes**
110
111The transmission information is not serializable.
112
113**Solution**
114
115Use transmission information that is a valid serialized object.
116
117## 10200007 Abnormal Worker File Path
118
119**Error Message**
120
121The worker file path is invalid.
122
123**Description**
124
125The file path is invalid, and the **Worker** instance cannot be loaded.
126
127**Possible Causes**
128
129The worker file path is invalid. As a result, a valid **worker.abc** file cannot be generated during the build.
130
131**Solution**
132
133Ensure that the worker file path complies with the specifications for creating **Worker** instances. For details, see the example under [constructor<sup>9+</sup>](../apis/js-apis-worker.md#constructor9).
134
135## 10200009 Buffer Size Error
136
137**Error Message**
138
139Buffer size must be a multiple of ${size}.
140
141**Description**
142
143The buffer size does not meet the requirement.
144
145**Possible Causes**
146
147The buffer size is not an integer multiple of **size**, which can be 16-bit, 32-bit, or 64-bit.
148
149**Solution**
150
151Use a buffer the size of which meets the requirements.
152
153
154## 10200010 Empty Container
155
156**Error Message**
157
158The container is empty.
159
160**Description**
161
162The container to be operated is empty.
163
164**Possible Causes**
165
166No element is added to the container.
167
168**Solution**
169
170Add elements to the container first.
171
172## 10200011 Passed this.object Is Not an Instance of the containers Class
173
174**Error Message**
175
176The {methodName} method cannot be bound.
177
178**Description**
179
180**this.object** passed in the API is not an instance of the **containers** class.
181
182**Possible Causes**
183
184The APIs of the **containers** class do not support **bind()**.
185
186**Solution**
187
1881. Check whether **bind()** is used to call the API.
1892. Check whether an object that is not a container instance is assigned to the API.
190
191## 10200012 Constructor Calling Failure
192
193**Error Message**
194
195The {className}'s constructor cannot be directly invoked.
196
197**Description**
198
199A constructor of the **containers** class is called directly to create an instance.
200
201**Possible Causes**
202
203The constructors of the **containers** class cannot be directly called. The keyword **new** must be used.
204
205**Solution**
206
207Use the keyword **new** to create an instance.
208
209## 10200013 Read-Only Properly
210
211**Error Message**
212
213Cannot set property ${propertyName} of Buffer which has only a getter.
214
215**Description**
216
217The buffer ${propertyName} is read-only and cannot be set.
218
219**Possible Causes**
220
221The buffer is read-only.
222
223**Solution**
224
225Do not set the read-only attribute for the buffer.
226
227## 10200014 Non-Concurrent Function Error
228
229**Error Message**
230
231The function is not mark as concurrent.
232
233**Description**
234
235The function is not marked as **concurrent**.
236
237**Possible Causes**
238
239**@Concurrent** is not added to the function required by the task to be executed in the task pool.
240
241**Solution**
242
243Check the functions required by the tasks executed by the task pool and add the **@Concurrent** decorator.
244
245## 10200015 Failed to Cancel a Task That Does Not Exist
246
247**Error Message**
248
249The task is not exist when cancel it.
250
251**Description**
252
253This error code is reported when you attempt to cancel a task that does not exist.
254
255**Possible Causes**
256
257The task to cancel does not exist in the task pool.
258
259**Solution**
260
261Before canceling a task, ensure that the task is placed into the task pool by calling **taskpool.execute**.
262
263## 10200016 Failed to Cancel a Task Being Executed
264
265**Error Message**
266
267The task is running when cancel it.
268
269**Description**
270
271This error code is reported when you attempt to cancel a task that is being executed.
272
273**Possible Causes**
274
275The task to cancel is being executed.
276
277**Solution**
278
279Before canceling a task, ensure that the task finishes execution.
280
281## 10200017 Failed to Delete an Element That Does Not Exist
282
283**Error Message**
284
285The element does not exist in this container.
286
287**Description**
288
289This error code is reported when you attempt to delete an element that does not exist in the container.
290
291**Possible Causes**
292
293The element to delete does not exist in the container.
294
295**Solution**
296
297Before deleting an element, ensure that the element exists in this container.
298