function drush_backend_packet_set_error

8.0.x backend.inc drush_backend_packet_set_error($data, $backend_options)
6.x backend.inc drush_backend_packet_set_error($data, $backend_options)
7.x backend.inc drush_backend_packet_set_error($data, $backend_options)
5.x backend.inc drush_backend_packet_set_error($data, $backend_options)
master backend.inc drush_backend_packet_set_error($data, $backend_options)

Backend command for setting errors.

File

includes/backend.inc, line 586
Drush backend API

Code

function drush_backend_packet_set_error($data, $backend_options) {
  if (!$backend_options['integrate']) {
    return;
  }
  $output_label = "";
  if (array_key_exists('#output-label', $backend_options)) {
    $output_label = $backend_options['#output-label'];
  }
  drush_set_error($data['error'], $data['message'], $output_label);
}