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
The task closure is marked as throwing, but errors thrown from here are not handled. I initially created a custom error and threw it as a form of validation (e.g. an invalid path provided)
To Reproduce
Create a task, throw an error inside and then run it
Expected behavior
We should handle this gracefully
The text was updated successfully, but these errors were encountered:
@fortmarek thanks for creating these issues, I've taken a very quick look at handling error throwing but have some concerns about my implementation. You can see the code here but the things I wasn't sure about:
This uses print to output the error because ProjectAutomation doesn't import TuistSupport so I couldn't use a logger instance
Should error handling happen within Task.swift or should it be exiting with a message which is captured by an error handler within the ExecCommand code?
Happy to have a chat about this change, either here or I'm in the tuist slack as well
This uses print to output the error because ProjectAutomation doesn't import TuistSupport so I couldn't use a logger instance
Indeed, you can't!
Should error handling happen within Task.swift or should it be exiting with a message which is captured by an error handler within the ExecCommand code?
This way we can reuse the logger functionality, so I think this is a good step forward 👍
Describe the bug
The task closure is marked as throwing, but errors thrown from here are not handled. I initially created a custom error and threw it as a form of validation (e.g. an invalid path provided)
To Reproduce
Create a task, throw an error inside and then run it
Expected behavior
We should handle this gracefully
The text was updated successfully, but these errors were encountered: