Show errors which occurred when first loading a task's script.
760995
function showLoadingErrors() {
  const failedTasks = []
  const taskStatus = {}

  // Construct data for full report
  for (const data of scripts) {
    const messages = []
    // check sources
    const mSources = data.sources.filter(s => glob.sync(s).length === 0)
    if (mSources.length !== 0) {
      messages.push(
        `✘ Missing sources: ${(mSources.length > 1 ? '\n  ' : '') +
          mSources.map(s => `'${s}'`).join('\n  ')}`
      )
    }
    // display remaining errors
    for (const error of data.errors) {
      let msg = error.message || error.toString()
      const prefix = msg.startsWith('Error') ? '' : 'Error: '
      messages.push(`✘ ${prefix}${msg.replace(/\n/g, '\n  ')}`)
    }
    if (messages.length > 0) {
      failedTasks.push(data.name)
    } else {
      messages.push(`✔ No issues detected`)
    }
    taskStatus[data.name] = messages
  }

  if (failedTasks.length !== 0) {
    const messages = []
    for (const key of Object.keys(taskStatus)) {
      messages.push(
        `${key}:\n  ${taskStatus[key].join('\n').replace(/\n/g, '\n  ')}`
      )
    }

    showError(
      new Error(
        `${failedTasks.length > 1 ? 'Errors' : 'Error'} in ${failedTasks
          .map(s => `'${s}'`)
          .join(', ')}\n${messages.join('\n')}`
      )
    )
  }
}
192418
def task_event_list(task_id, limit, filter_errors, filter_non_errors):
    
    client = get_client()

    # cannot filter by both errors and non errors
    if filter_errors and filter_non_errors:
        raise click.UsageError("Cannot filter by both errors and non errors")

    elif filter_errors:
        filter_string = "is_error:1"

    elif filter_non_errors:
        filter_string = "is_error:0"

    else:
        filter_string = ""

    event_iterator = client.task_event_list(
        task_id, num_results=limit, filter=filter_string
    )

    def squashed_json_details(x):
        is_json = False
        try:
            loaded = json.loads(x["details"])
            is_json = True
        except ValueError:
            loaded = x["details"]

        if is_json:
            return json.dumps(loaded, separators=(",", ":"), sort_keys=True)
        else:
            return loaded.replace("\n", "\\n")

    formatted_print(
        event_iterator,
        fields=(
            ("Time", "time"),
            ("Code", "code"),
            ("Is Error", "is_error"),
            ("Details", squashed_json_details),
        ),
        json_converter=iterable_response_to_dict,
    )
859737
def execution_errors(self):
        
        if self.split_actions:
            # throttling split this action, get errors from the split
            return [dict(e) for s in self.split_actions for e in s.errors]
        else:
            return [dict(e) for e in self.errors]
953232
def go_to_error(self, text):
        """"""
        match = get_error_match(to_text_string(text))
        if match:
            fname, lnb = match.groups()
            self.edit_script(fname, int(lnb))
1112104
function (def, err) {
    def.errors = def.errors || []
    err.message = err.message.cyan
    def.errors.push(err)
  }
1104114
def exit_on_error(self):
        """"""
        if self.exit_code:
            if self.errmsg is not None:
                logger.show("Exiting due to " + self.errmsg + ".")
                self.errmsg = None
            if self.using_jobs:
                kill_children()
            sys.exit(self.exit_code)
326655
def __analizar_errores(self, ret):
        ""
        if 'arrayErrores' in ret:
            errores = ret['arrayErrores'] or []
            self.Errores = [err['error'] for err in errores]
            self.ErrCode = ' '.join(self.Errores)
            self.ErrMsg = '\n'.join(self.Errores)
1315287
public void displayError(int iErrorCode)
    {
        if (iErrorCode < -2)
        {   // Error codes < -2 are usually user defined (and available at 'LastError')
            Task task = this.getTask();//getAppletScreen().getScreenFieldView().getControl();
            if (task != null)
            {
                String strError = task.getLastError(iErrorCode);
                if ((strError != null) && (strError.length() > 0))
                {
                    this.displayError(strError);
                    return;
                }
            }
        }
        DBException e = new DBException(iErrorCode);
        this.displayError(e);
    }
1067567
def on_failure(self, exc, task_id, args, kwargs, einfo):
        
        log.error('[{}] failed due to {}'.format(task_id, getattr(einfo, 'traceback', None)))
        super(LoggedTask, self).on_failure(exc, task_id, args, kwargs, einfo)
564149
def get_errors(self):
        
        result = []
        while not self.errors.empty():  # pragma: no cover
            try:
                e = self.errors.get(False)
                result.append(e)
            except self.errors.Empty:
                continue
            self.errors.task_done()
        return result
528642
def error_info():
    """"""
    worker = global_worker
    worker.check_connected()
    return (global_state.error_messages(driver_id=worker.task_driver_id) +
            global_state.error_messages(driver_id=DriverID.nil()))
89485
def modify_usage_error(subcommand, program_list):
    
    import click
    from click._compat import get_text_stderr
    from click.utils import echo

    def show(self, file=None):
        import sys
        if file is None:
            file = get_text_stderr()
        color = None
        if self.ctx is not None:
            color = self.ctx.color
        echo('Error: %s\n' % self.format_message(), file=file, color=color)
        # Set the sys.argv to be the first two arguments passed to the script if the subcommand was specified
        arg2 = sys.argv[1] if sys.argv[1] in program_list else str()
        sys.argv = [' '.join([sys.argv[0], arg2])] if arg2 else [sys.argv[0]]
        # Call the help
        subcommand(['--help'])

    click.exceptions.UsageError.show = show
666050
protected function loadErrorModule() : void
    {
        $fqn = $this->getFullyQualifiedClass('index', 'index');
        $the_module = new $fqn();
        $action = $this->getActionMethodName((string)$this->response->getStatusCode());
        if (method_exists($fqn, $action)) {
            call_user_func_array(array($the_module, $action), [$this->response->getVariables()]);
        } else {
            // There is no error handler for this error, show the index but don't pass variables
            call_user_func_array(array($the_module, $this->getActionMethodName('index')), []);
        }
    }
294818
function handleRequestError(eventTarget, type) {
  readyStateChange(eventTarget, states.DONE);

  dispatchProgressEvent(eventTarget, {
    type: 'progress',
    total: 0,
    loaded: 0,
    lengthComputable: false
  });

  dispatchProgressEvent(eventTarget, {
    type: type,
    total: 0,
    loaded: 0,
    lengthComputable: false
  });

  dispatchProgressEvent(eventTarget, {
    type: 'loadend',
    total: 0,
    loaded: 0,
    lengthComputable: false
  });
}
960423
private function logOverviewErrors(): void
  {
    if (!empty($this->errorFilenames))
    {
      $this->io->warning('Routines in the files below are not loaded:');
      $this->io->listing($this->errorFilenames);
    }
  }
870441
def check_error(result, func, cargs):
    ""
    if result != 0:
        msg = 'Error in "%s": %s' % (func.__name__, get_errors(result) )
        raise RTreeError(msg)
    return
1363051
def error_output(self, message, method_affected=None):
        
        color_fn = self._py3_wrapper.get_config_attribute
        color = color_fn(self.module_full_name, "color_error")
        if hasattr(color, "none_setting"):
            color = color_fn(self.module_full_name, "color_bad")
        if hasattr(color, "none_setting"):
            color = None

        error = {
            "full_text": message,
            "color": color,
            "instance": self.module_inst,
            "name": self.module_name,
        }
        for method in self.methods.values():
            if method_affected and method["method"] != method_affected:
                continue

            method["last_output"] = [error]

        self.allow_config_clicks = False
        self.set_updated()