Sets the current {@link PrintStream} for standard error for the current nail.

@param err The {@link PrintStream} to use as stderr for the current nail. This should be a
PrintStream that ultimately writes to {@link NGOutputStream}.
353809
public void setErr(PrintStream err) {
    this.err = err;
    if (!(System.err instanceof ThreadLocalPrintStream)) {
      throw new IllegalStateException("System.err should be set by nailgun.");
    }
    ThreadLocalPrintStream tls = (ThreadLocalPrintStream) System.err;
    tls.init(err);
  }
688929
public void rawError(int pos, String msg) {
        PrintWriter errWriter = writers.get(WriterKind.ERROR);
        if (nerrors < MaxErrors && shouldReport(currentSourceFile(), pos)) {
            printRawDiag(errWriter, "error: ", pos, msg);
            prompt();
            nerrors++;
        }
        errWriter.flush();
    }
695001
public void error(final int errorCode, final String message) {
		try {
			this.response.sendError(errorCode, message);
		} catch (final IOException e) {
			e.printStackTrace();
		}
	}
793405
public static function forError(): OutputStream
    {
        if (null === self::$err) {
            self::$err = self::create('php://stderr');
        }

        return self::$err;
    }
354295
def err(msg, *args, **kw):
    # type: (str, *Any, **Any) -> None
    
    if len(args) or len(kw):
        msg = msg.format(*args, **kw)

    shell.cprint('-- <31>{}<0>'.format(msg))
461561
def print_err(*args, **kwargs):
    
    if kwargs.get('file', None) is None:
        kwargs['file'] = sys.stderr
    print(*args, **kwargs)
543135
function error(err) {
      this.log(`${chalk.red(`${err.name.toLowerCase()}:`)} ${err.message}`);
    }
710104
protected final void setError(int newPosition, int errorNumberItem,
      HashMap<String, Integer> errorListItem, boolean currentExisting)
      throws IOException {
    if (!closed) {
      if (currentExisting) {
        newErrorNumber[newPosition] += errorNumberItem;
        HashMap<String, Integer> item = newErrorList[newPosition];
        for (Entry<String, Integer> entry : errorListItem.entrySet()) {
          if (item.containsKey(entry.getKey())) {
            item.put(entry.getKey(),
                item.get(entry.getKey()) + entry.getValue());
          } else {
            item.put(entry.getKey(), entry.getValue());
          }
        }
      } else {
        newErrorNumber[newPosition] = errorNumberItem;
        newErrorList[newPosition] = errorListItem;
      }
    } else {
      throw new IOException("already closed");
    }
  }
1036505
public void setError(StanzaError.Builder xmppErrorBuilder) {
        if (xmppErrorBuilder == null) {
            return;
        }
        xmppErrorBuilder.setStanza(this);
        error = xmppErrorBuilder.build();
    }
315345
public static void error(String message) {
    errorMessages.add(message);
    errorStream.println(getFullMessage("error: ", message, CLANG_STYLE_ERROR_MSG));
    errorCount++;
  }
404529
def print_err(*args, **kwargs):
    
    sys.stderr.write(" ".join(str(arg) for arg in args) + "\n")
    if kwargs.get("flush", False):
        sys.stderr.flush()
767411
public void setOut(PrintStream out) {
    this.out = out;
    if (!(System.out instanceof ThreadLocalPrintStream)) {
      throw new IllegalStateException("System.out should be set by nailgun.");
    }
    ThreadLocalPrintStream tls = (ThreadLocalPrintStream) System.out;
    tls.init(out);
  }
81870
def write_err(self, text):
        """"""
        stderr = self.stderr
        if self.stderr.closed:
            stderr = sys.stderr
        stderr.write(decode_output(u"\r", target_stream=stderr))
        stderr.write(decode_output(CLEAR_LINE, target_stream=stderr))
        if text is None:
            text = ""
        text = decode_output(u"{0}\n".format(text), target_stream=stderr)
        self.stderr.write(text)
        self.out_buff.write(decode_output(text, target_stream=self.out_buff))
902632
function printStack(err) {
  if (err && err.stack) {
    console.error(err.stack);
  }
  else {
    console.log(err);
  }
}
462801
private synchronized String printTargetError( Throwable t ) {
            StringBuilder msgs = new StringBuilder(t.toString());
            while ( null != (t = t.getCause()) )
                msgs.append("\n").append(t.toString());
            return msgs.toString();
    }
908979
def print_error(self, error):
        
        print(colored(error.message, 'red'), file=self.stderr)

        if error.stdout or error.stderr:
            print(file=self.stderr)
            print("Here's what git said:", file=self.stderr)
            print(file=self.stderr)

            if error.stdout:
                print(error.stdout, file=self.stderr)
            if error.stderr:
                print(error.stderr, file=self.stderr)

        if error.details:
            print(file=self.stderr)
            print("Here's what we know:", file=self.stderr)
            print(str(error.details), file=self.stderr)
            print(file=self.stderr)
697803
@Override
    public void onError(final Throwable t) {

        Objects.requireNonNull(t);
        if (stream != null)
            ((Consumer) stream.getErrorHandler()
                    .orElse((Consumer) h -> {
                    })).accept(t);
        if (errorHandler != null)
            errorHandler.accept(t);

    }