A short cut for reading stderr messsage

@return
348648
public String getStdErr()
    {
        return debug.transform(new Function<Debug, String>()
        {
            @Override
            public String apply(Debug input)
            {
                return input.getStderr();
            }
        }).or("");
    }
567769
String readNonEscaped() throws IOException {
		StringBuilder s = new StringBuilder();
		do {
			int c = reader.read();
			if (c < 0) {
				return s.toString().trim();
			}
			if (c == SEPARATOR || c == '\n') {
				reader.unread(c);
				return s.toString().trim();
			} else {
				s.append((char) c);
			}
		} while (true);
	}
1192961
private BufferedWriter getTextOut() {
        if (textOut == null) {
            PrintStream proxy = WeakProxy.forObject(this);
            charOut = charset != null ? new OutputStreamWriter(proxy, charset) :
                    new OutputStreamWriter(proxy);
            textOut = new BufferedWriter(charOut);
        }
        return textOut;
    }
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))
948474
public int getMessageLength() {
		// Message type
		int messageLength = 1;

		// Number of aliases
		messageLength += 4;

		if (this.aliases != null) {
			for (AttributeAlias alias : this.aliases) {
				// Alias number, name length
				messageLength += 8;
				try {
					messageLength += alias.attributeName.getBytes("UTF-16BE").length;
				} catch (UnsupportedEncodingException e) {
					log.error("Unable to encode strings into UTF-16.");
					e.printStackTrace();
				}
			}
		}

		return messageLength;
	}
511185
public String getMessage() {
        String message = super.getMessage();
        if (m_iErrorCode != -1)
            message = message + " Error code: " + m_iErrorCode;
        return message;
    }
794503
private String auditReader(PrintStream stderr, Map<String, String> props) throws Exception {

        try {
            return AuditLogReader.getReport(props.get("auditFileLocation"), props.get("outputFileLocation"),
                                            props.get("encrypted"),
                                            props.get("encKeyStoreLocation"),
                                            props.get("encKeyStorePassword"),
                                            props.get("encKeyStoreType"),
                                            props.get("signed"),
                                            props.get("signingKeyStoreLocation"),
                                            props.get("signingKeyStorePassword"),
                                            props.get("signingKeyStoreType"),
                                            isDebug);
        } catch (Exception e) {
            throw e;
        }
    }
617681
public String readPassword() {
        this.before = "";
        this.after = "";

        terminal.formatln("%s: ", message);

        try {
            for (; ; ) {
                Char c = terminal.read();
                if (c == null) {
                    throw new IOException("End of input.");
                }

                int ch = c.asInteger();

                if (ch == Char.CR) {
                    return before + after;
                }

                if (ch == Char.DEL || ch == Char.BS) {
                    // backspace...
                    if (before.length() > 0) {
                        before = before.substring(0, before.length() - 1);
                        printInputLine();
                    }
                    continue;
                }

                if (c instanceof Control) {
                    if (c.equals(Control.DELETE)) {
                        if (after.length() > 0) {
                            after = after.substring(1);
                        }
                    } else if (c.equals(Control.LEFT)) {
                        if (before.length() > 0) {
                            after = "" + before.charAt(before.length() - 1) + after;
                            before = before.substring(0, before.length() - 1);
                        }
                    } else if (c.equals(Control.HOME)) {
                        after = before + after;
                        before = "";
                    } else if (c.equals(Control.RIGHT)) {
                        if (after.length() > 0) {
                            before = before + after.charAt(0);
                            after = after.substring(1);
                        }
                    } else if (c.equals(Control.END)) {
                        before = before + after;
                        after = "";
                    } else {
                        // Silently ignore unknown control chars.
                        continue;
                    }
                    printInputLine();
                    continue;
                }

                if (ch == Char.ESC || ch == Char.ABR || ch == Char.EOF) {
                    throw new IOException("User interrupted: " + c.asString());
                }

                if (ch < 0x20) {
                    // Silently ignore unknown ASCII control characters.
                    continue;
                }

                before = before + c.toString();
                printInputLine();
            }
        } catch (IOException e) {
            throw new UncheckedIOException(e);
        }
    }
1244721
protected void handleError(InputStream stderr) throws IOException {
        byte[] buffer = new byte[4 * 1024];
        int    b;
        while ((b = stderr.read(buffer)) > 0) {
            err.write(buffer, 0, b);
        }
    }
821550
protected function readdmesg()
    {
        if (count($this->_dmesg) === 0) {
            if (CommonFunctions::rfts('/var/log/messages', $buf)) {
                    $blocks = preg_replace("/\s(kernel: MINIX \d+\.\d+\.\d+\.)/", '<BLOCK>$1', $buf);
                    $parts = preg_split("/<BLOCK>/", $blocks, -1, PREG_SPLIT_NO_EMPTY);
                    $this->_dmesg = preg_split("/\n/", $parts[count($parts) - 1], -1, PREG_SPLIT_NO_EMPTY);
            }
        }

        return $this->_dmesg;
    }
1362568
public String getErrorMessage() {
        final Object result = getStateHelper().eval(PropertyKeys.errorMessage);
        if (result == null) {
            return null;
        }
        return result.toString();
    }
25320
@Override
    public String getMessage() {
        String message = super.getMessage();

        if (message == null) {
            message = "";
        }

        if (hexdump != null) {
            return message + (message.length() > 0 ? " " : "") + "(Hexdump: "
                    + hexdump + ')';
        }

        return message;
    }
784240
public String getMessage() {
	StringBuffer buf = new StringBuffer();
	if (code != UNSPECIFIED) {
	    buf.append(getCodeExplanation(code));
	}
	if (customMessage != null) {
	    buf.append(" Custom message: ");
	    buf.append(customMessage);
	}
	if (code != UNSPECIFIED) {
	    buf.append(" (error code ").append(String.valueOf(code)).append(")");
	}
	if (cause != null) {
	    buf.append(" [Nested exception message: ");
	    buf.append(cause.getMessage());
	    buf.append("]");
	}
	return buf.toString();
    }
1030813
public static StderrStream create()
  {
    if (_stderr == null) {
      _stderr = new StderrStream();
      ConstPath path = new ConstPath(null, _stderr);
      path.setScheme("stderr");
      //_stderr.setPath(path);
    }

    return _stderr;
  }
1317205
@SuppressWarnings("fallthrough")
  String getRemainingJSDocLine() {
    int c;
    for (;;) {
      c = getChar();
      switch (c) {
        case '*':
          if (peekChar() != '/') {
            addToString(c);
            break;
          }
          // fall through
        case EOF_CHAR:
        case '\n':
          ungetChar(c);
          this.string = getStringFromBuffer();
          stringBufferTop = 0;
          return this.string;

        default:
          addToString(c);
          break;
      }
    }
  }
663845
def parse_stderr(self, filelike):
        
        marker_error = 'ERROR,'
        marker_warning = 'WARNING,'

        messages = {'errors': [], 'warnings': []}

        for line in filelike.readlines():
            if marker_error in line:
                messages['errors'].append(line.split(marker_error)[-1].strip())
            if marker_warning in line:
                messages['warnings'].append(line.split(marker_warning)[-1].strip())

        if self.node.get_option('attach_messages'):
            self.out('messages', Dict(dict=messages))

        for error in messages['errors']:
            if 'unknown option' in error:
                return self.exit_codes.ERROR_INVALID_COMMAND_LINE_OPTION

        return
473691
public String str()
  {

    if (null == m_strCache)
    {
      m_strCache = fsb().getString(m_start, m_length);

//      strCount++;
//
//      RuntimeException e = new RuntimeException("Bad!  Bad!");
//      java.io.CharArrayWriter writer = new java.io.CharArrayWriter();
//      java.io.PrintWriter pw = new java.io.PrintWriter(writer);
//
//      e.printStackTrace(pw);
//
//      String str = writer.toString();
//
//      str = str.substring(0, 600);
//
//      if (null == xtable.get(str))
//      {
//        xtable.put(str, str);
//        System.out.println(str);
//      }
//      System.out.println("strCount: " + strCount);

//      throw e;
//      e.printStackTrace();
      // System.exit(-1);
    }

    return m_strCache;
  }