/*!
Output an error if one is found
193265
public function output_error($code)
    {
        // Output the proper response code.
        if (array_key_exists((int) $code, $this->errors)) {
            http_response_code((int) $code);
        }

        $payload = array(
            'status' => 'error',
            'version' => $this->version,
            'data' => array(
                'code' => $code,
                'message' => $this->errors[$code]
            ),
            'runtime' => round(microtime(true) - $this->runtime, 3)
        );

        // Output the data in the desired format.
        switch ($this->format) {
            case 'xml':
                return output_pretty_xml($payload);
            case 'json':
                return output_pretty_json($payload);
            case 'jsonp':
                return output_pretty_jsonp($payload, $this->callback);
            case 'php':
                return output_pretty_php($payload);
        }

        return false;
    }
485223
function showError(err) {
  if (!err) return
  const message =
    typeof err === 'string' ? err : err.message || err.formatted || ''
  const plugin = err.plugin || 'gulp-task-maker'

  // Show system notification
  if (!err.warn && options.notify) {
    const where = path.basename(process.cwd())
    notifier.notify({
      title: `${where}: ${plugin} error`,
      message: message.replace(/\s*\n+\s*/g, '\n')
    })
  }

  // Throw or log in console
  if (options.strict) throw err
  else customLog(`${plugin} error: ${message}`)
}
1033660
static function errorHandler($errno, $errstr, $errfile, $errline) {
	    switch ($errno) {
	    case E_USER_ERROR:
	        echo "<b>ERROR:</b> [$errno] $errstr<br>
	        <b>File: </b>$errfile [$errline]<br>
	        Aborting...<br>";
	        exit(1);
	        break;

	    case E_USER_WARNING:
	        echo "<b>WARNING:</b> [$errno] $errstr<br><b>File:</b> $errfile [$errline]";
	        break;

	    case E_USER_NOTICE:
	        echo "<b>NOTICE:</b> [$errno] $errstr<br><b>File:</b> $errfile [$errline]";
	        break;

	    default:
	        echo "<b>Unknown error type:</b> [$errno] $errstr<br><b>File:</b> $errfile [$errline]";
	        break;
	    }

	    /* Don't execute PHP internal error handler */
	    return true;
	}
619357
function error($code,$text='',array $trace=NULL,$level=0) {
		$prior=$this->hive['ERROR'];
		$header=$this->status($code);
		$req=$this->hive['VERB'].' '.$this->hive['PATH'];
		if ($this->hive['QUERY'])
			$req.='?'.$this->hive['QUERY'];
		if (!$text)
			$text='HTTP '.$code.' ('.$req.')';
		$trace=$this->trace($trace);
		$loggable=$this->hive['LOGGABLE'];
		if (!is_array($loggable))
			$loggable=$this->split($loggable);
		foreach ($loggable as $status)
			if ($status=='*' ||
				preg_match('/^'.preg_replace('/\D/','\d',$status).'$/',$code)) {
				error_log($text);
				foreach (explode("\n",$trace) as $nexus)
					if ($nexus)
						error_log($nexus);
				break;
			}
		if ($highlight=!$this->hive['CLI'] && !$this->hive['AJAX'] &&
			$this->hive['HIGHLIGHT'] && is_file($css=__DIR__.'/'.self::CSS))
			$trace=$this->highlight($trace);
		$this->hive['ERROR']=[
			'status'=>$header,
			'code'=>$code,
			'text'=>$text,
			'trace'=>$trace,
			'level'=>$level
		];
		$this->expire(-1);
		$handler=$this->hive['ONERROR'];
		$this->hive['ONERROR']=NULL;
		$eol="\n";
		if ((!$handler ||
			$this->call($handler,[$this,$this->hive['PARAMS']],
				'beforeroute,afterroute')===FALSE) &&
			!$prior && !$this->hive['CLI'] && !$this->hive['QUIET'])
			echo $this->hive['AJAX']?
				json_encode(
					array_diff_key(
						$this->hive['ERROR'],
						$this->hive['DEBUG']?
							[]:
							['trace'=>1]
					)
				):
				('<!DOCTYPE html>'.$eol.
				'<html>'.$eol.
				'<head>'.
					'<title>'.$code.' '.$header.'</title>'.
					($highlight?
						('<style>'.$this->read($css).'</style>'):'').
				'</head>'.$eol.
				'<body>'.$eol.
					'<h1>'.$header.'</h1>'.$eol.
					'<p>'.$this->encode($text?:$req).'</p>'.$eol.
					($this->hive['DEBUG']?('<pre>'.$trace.'</pre>'.$eol):'').
				'</body>'.$eol.
				'</html>');
		if ($this->hive['HALT'])
			die(1);
	}
1242670
function parseError(e) {
  if(e.ns === 'STORE.REDIS') return true;
  if(e.code && e.code.indexOf('REDIS') === 0) {
    e.ns = 'STORE.REDIS';
    return true;
  }
}
926084
static function ErrorHandler($errno, $errstr, $errfile, $errline)
    {
        switch ($errno) {
            case E_ERROR:
                $errtype = ReporticoLang::translate("Error");
                break;
            case E_NOTICE:
                $errtype = ReporticoLang::translate("Notice");
                break;
            case E_USER_ERROR:
                $errtype = ReporticoLang::translate("Error");
                break;
            case E_USER_WARNING:
                $errtype = ReporticoLang::translate("");
                break;
            case E_USER_NOTICE:
                $errtype = ReporticoLang::translate("");
                break;
            case E_WARNING:
                $errtype = ReporticoLang::translate("");
                break;

            default:
                $errtype = ReporticoLang::translate("Fatal Error");

        }
        
        
        // If request parameter errorsInModal is set then popup first user error
        // back to client and exit. This is to popup errors when probles in saving reports
        if ( ReporticoUtility::getRequestItem("errorsInModal") && $errno == E_USER_ERROR ) {


            header("HTTP/1.0 404 Not Found", true);
            echo $errstr;
            die;


        }
        // Avoid adding duplicate errors
        $errors = &self::getSystemErrors();
        $ct = 0;
        foreach ( self::getSystemErrors() as $k => $val) {
            if ($val["errstr"] == $errstr) {
                $errors[$k]["errct"] = $ct+1;
                return;
            }
        }

        $errors[] =
                array(
                "errno" => $errno,
                "errstr" => $errstr,
                "errfile" => $errfile,
                "errline" => $errline,
                "errtype" => $errtype,
                "errarea" => self::get("code_area"),
                "errsource" => self::get("code_source"),
                "errct" => 1,
                );
        //echo "<PRE>";
        //var_dump($errors);
        //echo "</PRE>";

        self::set("error_status", 1);

    }
1269684
function error(utils) {
  const target = this._obj;
  isValidation(target);
  const error = target.error || null,
      json = JSON.stringify(target, null, '\t');
  this.assert(null !== error,
      '#{this} should have error but does not: ' + json,
      '#{this} should not not have error but does: ' + json
  );
  utils.flag(this, 'object', error);
}
251780
function check( input, expected ) {
            const output = Util.replaceDotsWithSlashes( input );
            expect( output ).toBe( expected.split( '/' ).join( Path.sep ) );
        }
742773
function validation($data, $files) {
        global $COURSE, $DB;

        $errors = parent::validation($data, $files);

        $name = trim($data['name']);
        if (isset($data['idnumber'])) {
            $idnumber = trim($data['idnumber']);
        } else {
            $idnumber = '';
        }
        if ($data['id'] and $grouping = $DB->get_record('groupings', array('id'=>$data['id']))) {
            if (core_text::strtolower($grouping->name) != core_text::strtolower($name)) {
                if (groups_get_grouping_by_name($COURSE->id,  $name)) {
                    $errors['name'] = get_string('groupingnameexists', 'group', $name);
                }
            }
            if (!empty($idnumber) && $grouping->idnumber != $idnumber) {
                if (groups_get_grouping_by_idnumber($COURSE->id, $idnumber)) {
                    $errors['idnumber']= get_string('idnumbertaken');
                }
            }

        } else if (groups_get_grouping_by_name($COURSE->id, $name)) {
            $errors['name'] = get_string('groupingnameexists', 'group', $name);
        } else if (!empty($idnumber) && groups_get_grouping_by_idnumber($COURSE->id, $idnumber)) {
            $errors['idnumber']= get_string('idnumbertaken');
        }

        return $errors;
    }
494097
function onOutError(err) {
    errNodecat = combineErrors(errNodecat, err);
    errStream.write(`nodecat: ${err}\n`);
    if (inCleanup) {
      inCleanup();
    }
    allDone();
  }
511470
function onError(reason, commands) {
        if (typeof reason !== 'string' && typeof reason.message === 'string') {
            reason = reason.message;
        }
        return commands._replyFn(`An unexpected error \`${reason}\` occured and your commands could not be processed!`);
    }
248772
function error( $string = false, $addEOL = true )
    {
        $string = $this->stylize( 'error', $string );
        fputs( STDERR, $string );
        if ( $addEOL )
            fputs( STDERR, $this->endlineString() );
    }
1120346
public static function catchFatalErrorsEarly()
    {
        $error = error_get_last();
        if (($error['type'] === E_ERROR || $error['type'] === E_PARSE)) {
            echo nl2br(str_replace(dirname(dirname(__DIR__)), '', $error['message']));
        }
    }
1338866
public function errorf()
    {
        $args = func_get_args();
        $format = array_shift($args);
        $this->error(vsprintf($format, $args));
    }
488019
function onError( error ) {
		self.req.error = error;
		if ( process.connected ) {
			// TODO: log (or not; serialize in output message?)
			console.error( process.pid, 'request', error );
		}
	}
453073
def check_errors(raw: false)
      return if @err_array.empty?
      command = ''
      rest = ''
      @semaphore.synchronize do
        command = @err_array.first
        rest = @err_array[1..-1].join('; ')
        @err_array.clear
      end
      message = if raw
        "#{command};#{rest}}"
      else
        "Error in previous command (\"#{command}\"): \"#{rest}\""
      end
      fail GnuplotError, message
    end
859202
function _onError(error) {
        if (_connectDeferred) {
            _connectDeferred.reject();
            _connectDeferred = null;
        }
        exports.trigger("error", error);
    }