inpsyde / vip-composer-plugin

A Composer plugin to ease deployment to wordpress.com VIP servers alongside Composer-based local development.
MIT License
12 stars 0 forks source link

Tasks - handling of errors/exceptions in Task::run() #6

Open Chrico opened 3 years ago

Chrico commented 3 years ago

Is your feature request related to a problem? Please describe.

Currently Tasks are added and executed in Command and on exception we stop the execution. But in some cases like in the SymlinkVipGoDir::run() we do not check for successful execution and continue with an errornous results. In other cases we continue the runner, but printing errors, like in DownloadWpCore:run(). We should generalize this and consider, that "critical execution" needs to 100% succeed or otherwhise throw an Exception to stop the program.

Describe the solution you'd like Following Tasks need to be updated and throw a custom Exception when we cannot ensure that the task 100% completes:

Additional context See discussion here: https://github.com/inpsyde/vip-composer-plugin/pull/5

Just had a quick review yet..maybe we'll find more. Will update the list when i find one.