quickadd icon indicating copy to clipboard operation
quickadd copied to clipboard

[FEATURE REQUEST] The macro pipeline execution should stop when an error is raised.

Open petitpandarouge opened this issue 1 year ago • 0 comments

Is your feature request related to a problem? Please describe. When an error is in a script, I would like it to stop the pipeline execution. It is specially disturbing when dealing with variable. If the next step takes a variable filled by the previous script, because of the exception, the variable is not filled, and the next step display a popup asking for the variable.

Describe the solution you'd like If an error is raised, I would like to have to possibility to say to the pipeline to stop. I think about like a "stop" property on the "params" variable. If true, pipeline stops, if false, pipeline continue and popup displays.

Additional context Step to reproduce :

  • create a "test" macro image
  • copy this code into a "script.js" file accessible by QuickAdd
module.exports = async (params) => {
    params.variables['test'] = "this is a test";
};
  • in the macro, add the script and a capture choice image
  • define the "test" variable as file name of the capture image Everything works fine.
  • raise an error in the script
module.exports = async (params) => {
    throw new Error("my error");
    params.variables['test'] = "this is a test";
};
  • when executing the macro, the error is raised and the file name is asked. image image

petitpandarouge avatar Nov 07 '24 23:11 petitpandarouge