Generates a human readable form of this message, useful for debugging and
other purposes, with no newline characters.
491101
public static String shortDebugString(final MessageOrBuilder message) {
    try {
      final StringBuilder sb = new StringBuilder();
      SINGLE_LINE_PRINTER.print(message, new TextGenerator(sb));
      // Single line mode currently might have an extra space at the end.
      return sb.toString().trim();
    } catch (IOException e) {
      throw new IllegalStateException(e);
    }
  }
650866
private String createMessage(String... args) {

    StringBuilder buffer = new StringBuilder();
    for (String s : args) {
      if (buffer.length() > 0) {
        buffer.append(';');
      }
      buffer.append(s);
    }
    return buffer.toString();
  }
1017814
public static String printToString(final MessageOrBuilder message) {
    try {
      final StringBuilder text = new StringBuilder();
      print(message, text);
      return text.toString();
    } catch (IOException e) {
      throw new IllegalStateException(e);
    }
  }
1049328
def build_message(self):
        
        if self.params is None:
            inline_params = ""
        else:
            # Put all params in one string
            inline_params = ""
            if type(self.params) is list:
                for x in self.params:
                    if x != self.params[0]:
                        inline_params += ", "
                    if type(x) is int:
                        inline_params += str(x)
                    else:
                        inline_params += '"{}"'.format(x)
            else:
                inline_params += '"{}"'.format(self.params)

        # Build message with that string
        self.message = self.COMMAND_BODY.format(str(self.command_id), self.method, inline_params)
32279
@Override
    public String getFormattedMessage() {
        return message = message == null ? String.valueOf(charSequence) : message ;
    }
312417
public String getMessage()
    {
        String.format("Wrong Syntax for [%s]: %s", name,message);
        return  String.format("Wrong Syntax for [%s]: %s", name,message);
    }
994102
function formatMessage (message) {
  return '<error' +
    attr(message, 'line') +
    attr(message, 'column') +
    attr(message, 'severity') +
    attr(message, 'message') +
    ('source' in message ? attr(message, 'source') : '') +
    ' />'
}
407898
private function createMessage(): string
    {
        $message = '';
        foreach (libxml_get_errors() as $error) {
            $message .= trim($error->message) . (($error->file) ? (' in file ' . $error->file) : ('')) . ' on line ' . $error->line . ' in column ' . $error->column . "\n";
        }

        libxml_clear_errors();
        if (strlen($message) === 0) {
            return 'Transformation failed: unknown error.';
        }

        return $message;
    }
564527
protected static String message(Object message)
  {
    if(message == null) {
      return null;
    }
    if(!(message instanceof Throwable)) {
      return message.toString();
    }

    Throwable t = (Throwable)message;
    if(t.getCause() == null) {
      return t.toString();
    }

    int nestingLevel = 0;
    StringBuilder sb = new StringBuilder();
    for(;;) {
      sb.append(t.getClass().getName());
      sb.append(":");
      sb.append(" ");
      if(++nestingLevel == 8) {
        sb.append("...");
        break;
      }
      if(t.getCause() == null) {
        String s = t.getMessage();
        if(s == null) {
          t.getClass().getCanonicalName();
        }
        sb.append(s);
        break;
      }
      t = t.getCause();
    }
    return sb.toString();
  }
900573
public String getMessage() {
        StringBuffer sb = new StringBuffer();
        sb.append(desc);
        if (index >= 0) {
            sb.append(" near index ");
            sb.append(index);
        }
        sb.append(nl);
        sb.append(pattern);
        if (index >= 0) {
            sb.append(nl);
            for (int i = 0; i < index; i++) sb.append(' ');
            sb.append('^');
        }
        return sb.toString();
    }
160925
def show(self, msg, indent=0, style="", **kwargs):
        
        if self.enable_verbose:
            new_msg = self.MessageTemplate.with_style.format(
                indent=self.tab * indent,
                style=style,
                msg=msg,
            )
            print(new_msg, **kwargs)
143167
public <Message extends PMessage<Message, Field>, Field extends PField>
    void formatTo(OutputStream out, Message message) {
        IndentedPrintWriter builder = new IndentedPrintWriter(out, indent, newline);
        if (message == null) {
            builder.append(null);
        } else {
            builder.append(message.descriptor().getQualifiedName())
                   .append(space);
            appendMessage(builder, message);
        }
        builder.flush();
    }
78224
def format_message(severity, datetime, progname, msg)
      if String === msg then
        msg.inject('') { |s, line| s << super(severity, datetime, progname, line.chomp) }
      else
        super
      end
    end
1225619
def text(self, encoding=None, errors='strict'):
        
        """
        with self.open(mode='r', encoding=encoding, errors=errors) as f:
            return U_NEWLINE.sub('\n', f.read())
84071
def messages(fp, key='@message'):
    
    for line in lines(fp):
        txt = line.rstrip('\n')
        yield {key: txt}
1179103
@Override
    public String getFormattedMessage() {
        if (formattedMessage == null) {
            formattedMessage = formatMessage(messagePattern, argArray);
        }
        return formattedMessage;
    }
819164
public String getMessage() {
        BugPattern bugPattern = getBugPattern();
        String pattern = bugPattern.getAbbrev() + ": " + getLongDescription();
        FindBugsMessageFormat format = new FindBugsMessageFormat(pattern);
        try {
            return format.format(annotationList.toArray(new BugAnnotation[annotationList.size()]), getPrimaryClass());
        } catch (RuntimeException e) {
            AnalysisContext.logError("Error generating bug msg ", e);
            return bugPattern.getShortDescription() + " [Error generating customized description]";
        }
    }