You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Traverse all the parent tasks to check that they exist
78
94
lettasks=this.#rootTasks;
79
-
80
95
for(leti=0;i<taskId.length-1;i++){
81
96
constidFragment=taskId[i];
82
-
83
97
constcurrentTask=tasks.get(idFragment);
84
-
85
98
if(currentTask===undefined){
86
-
thrownewError(
87
-
`Task "${formatTaskId(taskId.slice(0,i+1))}" not found and trying to define subtask "${formatTaskId(taskId)}". Define an empty task if you just want to define subtasks`,
`Trying to define task "${formatTaskId(taskDefinition.id)}" with the named parameter ${namedParamName} but it is already defined as a global parameter by plugin ${globalParamEntry.pluginId}`,
178
-
);
179
-
}else{
180
-
thrownewError(
181
-
`Plugin ${pluginId} trying to define task "${formatTaskId(taskDefinition.id)}" with the named parameter ${namedParamName} but it is already defined as a global parameter by plugin ${globalParamEntry.pluginId}`,
`Plugin ${pluginId} is trying to override the named parameter ${paramName} of the task "${formatTaskId(taskDefinition.id)}" but it is already defined`,
210
-
);
211
-
}else{
212
-
thrownewError(
213
-
`Trying to override the named parameter ${paramName} of the task "${formatTaskId(taskDefinition.id)}" but it is already defined`,
Copy file name to clipboardExpand all lines: v-next/hardhat-errors/src/descriptors.ts
+45
Original file line number
Diff line number
Diff line change
@@ -197,6 +197,51 @@ Please ensure that an action is defined for each task.`,
197
197
websiteDescription:
198
198
"Required positional parameters must be defined before optional ones in a task definition.",
199
199
},
200
+
TASK_NOT_FOUND: {
201
+
number: 205,
202
+
messageTemplate: "Task %task% not found",
203
+
websiteTitle: "Task not found",
204
+
websiteDescription: "The provided task name does not match any task.",
205
+
},
206
+
SUBTASK_WITHOUT_PARENT: {
207
+
number: 206,
208
+
messageTemplate:
209
+
"Task %task% not found when attempting to define subtask %subtask%. If you intend to only define subtasks, please first define %task% as an empty task",
210
+
websiteTitle: "Subtask without parent",
211
+
websiteDescription:
212
+
"The parent task of the subtask being defined was not found. If you intend to only define subtasks, please first define the parent task as an empty task.",
213
+
},
214
+
TASK_ALREADY_DEFINED: {
215
+
number: 207,
216
+
messageTemplate:
217
+
"%actorFragment% trying to define the task %task% but it is already defined%definedByFragment%",
218
+
websiteTitle: "Task already defined",
219
+
websiteDescription:
220
+
"The task is already defined. Please ensure that tasks are uniquely named to avoid conflicts.",
221
+
},
222
+
EMPTY_TASK_ID: {
223
+
number: 208,
224
+
messageTemplate: "Task id cannot be an empty string or an empty array",
225
+
websiteTitle: "Empty task id",
226
+
websiteDescription:
227
+
"The task id cannot be an empty string or an empty array. Please ensure that the array of task names is not empty.",
228
+
},
229
+
TASK_PARAMETER_ALREADY_DEFINED: {
230
+
number: 209,
231
+
messageTemplate:
232
+
"%actorFragment% trying to define task %task% with the named parameter %namedParamName% but it is already defined as a global parameter by plugin %globalParamPluginId%",
233
+
websiteTitle: "Task parameter already defined",
234
+
websiteDescription:
235
+
"The task named parameter is already defined as a global parameter by another plugin. Please ensure that task parameters are uniquely named to avoid conflicts.",
236
+
},
237
+
TASK_OVERRIDE_PARAMETER_ALREADY_DEFINED: {
238
+
number: 210,
239
+
messageTemplate:
240
+
"%actorFragment% trying to override the named parameter %namedParamName% of the task %task% but it is already defined",
"An attempt is being made to override a named parameter that has already been defined. Please ensure that the parameter is not defined before trying to override it.",
0 commit comments