drush_set_error() allows the use of unique text strings to identify errors, which then reference the help system to retrieve the error message. We should consider doing this systematically.

Note, for example, that we have identical error text in drush_provision_drupal_provision_delete() and drush_http_provision_delete() making it difficult to determine where the error was actually flagged:

  drush_set_error(dt('Existing sites were found on this platform. These sites will need to be deleted before this platform can be deleted.'));

In this case, I think we may have code duplication, and maybe one ought to be removed. But the principle remains. To ensure unique error codes, perhaps we should use the preface the code with the name of the function.

Comments

ergonlogic’s picture

Issue summary: View changes
Status: Active » Closed (won't fix)

The 6.x-2.x branch will go EOL along with Drupal this week. So I'm closing this issue. If it remains a confirmed issue in 7.x-3.x, feel free to re-open, or better yet, create a new issue referencing this one.