function drush_cmp_error

8.0.x drush_cmp_error($error)
6.x drush_cmp_error($error)
7.x drush_cmp_error($error)
3.x drush_cmp_error($error)
4.x drush_cmp_error($error)
5.x drush_cmp_error($error)
master drush_cmp_error($error)

Check if a specific error status has been set.


error: A text string identifying the error that has occurred.

Return value

TRUE if the specified error has been set, FALSE if not

Related topics

1 call to drush_cmp_error()
_drush_backend_integrate in includes/
Integrate log messages and error statuses into the current process.


includes/, line 1743
The drush API implementation and helpers.


function drush_cmp_error($error) {
  $error_log = drush_get_error_log();

  if (is_numeric($error)) {

  return array_key_exists($error, $error_log);