Child pages
  • [deployment] Change deployment error handling
Skip to end of metadata
Go to start of metadata

Right now each error, that might happen during deployment process is handled by different part of the code (e.g. cache rebuild error in one place, sql error in other place) and this non-unified error handling doesn't prevent further deployment script execution if at least 1 error happens.

I think on ANY error during deployment we need to throw an exception and basta. Then wrap whole DeploymentHelper invocation in throw/catch block to have unified error reporting as well.

3 Comments

  1. Please describe the benefits of this

  2. Benefits, which both were described above, are

    • reducing duplicate error handling code amount
    • having central place for error processing during deployment

    There is no UI changes, that you might expected here. Only changes to make code easier to read & maintain.

  3. A good start was made in DeploymentHelper, SQL error not in "project_upgrades.sql" [5.2.1-RC1] discussion. There we capture all SQL errors (no matter of place, where they happened) and throw an exception. Later in a single place we just "return false" to indicate error state.