Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
petitpandarouge opened this issue Nov 7, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@petitpandarouge
Copy link

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 petitpandarouge added the enhancement New feature or request label Nov 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant