Create a detail message.

@param lineNumber the line number
@param line the character line
@param tline the trimmed character line
@param msg the message
@return the detail message
340155
private static String makeMessage(int lineNumber, String line, String tline, String msg) {
        int columnNumber = (tline != null ? line.indexOf(tline) : 0);
        StringBuilder sb = new StringBuilder();
        if (msg != null) {
            sb.append(msg);
        }
        sb.append(" [lineNumber: ").append(lineNumber);
        if (columnNumber != -1) {
            String lspace = line.substring(0, columnNumber);
            int tabCnt = StringUtils.search(lspace, "\t");
            if (tline != null && tline.length() > 33) {
                tline = tline.substring(0, 30) + "...";
            }
            sb.append(", columnNumber: ").append(columnNumber + 1);
            if (tabCnt != 0) {
                sb.append(" (");
                sb.append("Tabs ").append(tabCnt);
                sb.append(", Spaces ").append(columnNumber - tabCnt);
                sb.append(")");
            }
            sb.append("] ").append(tline);
        }
        return sb.toString();
    }
1092608
def message_line
      begin
        if @scanner.getch == '"'
          text = message_text
          unless @scanner.getch == '"'
            err_msg = "The message text '#{text}' must be finished with the double quote character '\"'."
            raise PoSyntaxError, err_msg
          end
          skip_whitespace
          unless end_of_line
            err_msg = "There should be only whitespace until the end of line"
            err_msg += " after the double quote character of a message text."
            raise PoSyntaxError.new(err_msg)
          end
          text
        else
          @scanner.pos = @scanner.pos - 1
          err_msg = "A message text needs to start with the double quote character '\"',"
          err_msg += " but this was found: #{@scanner.peek(10).inspect}"
          raise PoSyntaxError, err_msg
        end
      rescue PoSyntaxError => pe
        raise PoSyntaxError, "Syntax error in message_line\n" + pe.message, pe.backtrace
      end
    end
598707
function formatMsg(){

        return Array.prototype.slice.call( arguments ) .concat([ " (at ", linen, ":", linec, ")." ]) .join( "" );
    }
90383
public final void initLineNumber(int lineNumber)
    {
        if (lineNumber <= 0) throw new IllegalArgumentException(String.valueOf(lineNumber));
        if (this.lineNumber > 0) throw new IllegalStateException();
        this.lineNumber = lineNumber;
    }
469289
void dbg(String msg) {
		if (debug ) {
			if (!msg.endsWith(LINE_SEP)) {
				System.err.println(LE + msg);
			} else {
				System.err.print(LE + msg);
			}
		}
	}
861794
def debug_print_strip_msg(self, i, line):
        
        if self.debug_level == 2:
            print("     Stripping Line %d: '%s'" % (i + 1, line.rstrip(' \r\n\t\f')))
        elif self.debug_level > 2:
            print("     Stripping Line %d:" % (i + 1))
            hexdump(line)
987608
public void msg( Thread t, int severity, Object source, Throwable ex, String msg ) {
        logger.msg( t, severity,source,ex,msg);
    }
65608
def error(msg, details=None):
    ''''''
    msg = '{0} {1}'.format(red(KO), white(safe_unicode(msg)))
    msg = safe_unicode(msg)
    if details:
        msg = b'\n'.join((msg, safe_unicode(details)))
    echo(format_multiline(msg))
1301894
void error(String message, boolean useEndLineNumber) throws Exception {
		StoryException e = new StoryException(message);
		e.useEndLineNumber = useEndLineNumber;
		throw e;
	}
1038008
public static Text createTextElement(String tapLine) {

        Matcher m = Patterns.TEXT_PATTERN.matcher(tapLine);

        if (m.matches()) {
            Text result = new Text(tapLine);
            result.setIndentationString(m.group(1));
            result.indentation = m.group(1).length();
            return result;
        }

        return null;
    }
162970
String showScriptContextHTML( String s, int lineNo, int context )
    {
        StringBuilder sb = new StringBuilder();
        BufferedReader br = new BufferedReader( new StringReader(s) );

        int beginLine = Math.max( 1, lineNo-context );
        int endLine = lineNo + context;
        for( int i=1; i<=lineNo+context+1; i++ )
        {
            if ( i < beginLine )
            {
                try {
                    br.readLine();
                } catch ( IOException e ) {
                    throw new RuntimeException( e.toString() );
                }
                continue;
            }
            if ( i > endLine )
                break;

            String line;
            try {
                line = br.readLine();
            } catch ( IOException e ) {
                throw new RuntimeException( e.toString() );
            }

            if ( line == null )
                break;
            if ( i == lineNo )
                sb.append( "<font color=\"red\">"+i+": "+line +"</font><br/>" );
            else
                sb.append( i+": " +line +"<br/>" );
        }

        return sb.toString();
    }
598002
protected void error(String msg) {
		System.err.println(CSLToolContext.current().getToolName() + ": " + msg);
	}
1260390
private void htmlMessage(DetailHtmlBuilder htmlBuilder, String message) throws IOException {
		htmlBuilder.beginRow()
			.labelCell("Message").valueCell(" colspan=\"3\"", message)
			.endRow();
	}
767129
public void parseLine(String tapLine) {

        TapElement tapElement = TapElementFactory.createTapElement(tapLine);

        if (tapElement == null || state.isInYaml()) {

            String trimmedLine = tapLine.trim();
            Text text = TapElementFactory.createTextElement(tapLine);

            if (state.isInYaml()) {

                boolean yamlEndMarkReached = trimmedLine.equals("...") && (
                           tapLine.equals(state.getYamlIndentation() + "...")
                        || text.getIndentation() < state.getYamlIndentation().length());

                if (yamlEndMarkReached) {
                    state.setInYaml(false);
                    parseDiagnostics();
                } else {
                    state.getDiagnosticBuffer().append(tapLine);
                    state.getDiagnosticBuffer().append('\n');
                }
            } else {
                if (trimmedLine.equals("---")) {
                    if (text.getIndentation() < baseIndentation) {
                        throw new ParserException(String.format("Invalid indentation. Check your TAP Stream. Line: %s",
                                tapLine));
                    }
                    state.setInYaml(true);
                    state.setYamlIndentation(text.getIndentationString());
                } else {
                    state.getTestSet().getTapLines().add(text);
                    state.setLastParsedElement(text);
                }
            }
            return;
        }

        int indentation = tapElement.getIndentation();

        if (indentation < baseIndentation) {
            baseIndentation = indentation;
        }

        StreamStatus prevState = null;
        if (indentation != state.getIndentationLevel() && enableSubtests) { // indentation changed

            if (indentation > state.getIndentationLevel()) {
                int prevIndent = state.getIndentationLevel();
                pushState(indentation); // make room for children
                if (indentation - prevIndent > 4)
                    subStack.push(state);
            } else {
                // going down
                if (states.peek().getIndentationLevel() == indentation) {
                    prevState = state;
                    state = states.pop();
                } else {
                    state = new StreamStatus();
                    state.setIndentationLevel(indentation);
                    subStack.push(state);
                }
            }
        }

        if (tapElement instanceof Header) {

            if (state.getTestSet().getHeader() != null) {
                throw new ParserException("Duplicated TAP Header found.");
            }
            if (!state.isFirstLine()) {
                throw new ParserException(
                        "Invalid position of TAP Header. It must be the first "
                                + "element (apart of Comments) in the TAP Stream.");
            }
            state.getTestSet().setHeader((Header) tapElement);

        } else if (tapElement instanceof Plan) {

            Plan currentPlan = (Plan) tapElement;

            if (state.getTestSet().getPlan() != null) {
                if (currentPlan.getInitialTestNumber() != 1 || currentPlan.getLastTestNumber() != 0) {
                    throw new ParserException("Duplicated TAP Plan found.");
                }
            } else {
                state.getTestSet().setPlan(currentPlan);
            }

            if (state.getTestSet().getTestResults().size() <= 0
                    && state.getTestSet().getBailOuts().size() <= 0) {
                state.setPlanBeforeTestResult(true);
            }

        } else if (tapElement instanceof TestResult) {

            parseDiagnostics();

            final TestResult testResult = (TestResult) tapElement;
            if (testResult.getTestNumber() == 0) {
                if (state.getTestSet().getPlan() != null && !state.isPlanBeforeTestResult()) {
                    return; // done testing mark
                }
                if (state.getTestSet().getPlan() != null &&
                    state.getTestSet().getPlan().getLastTestNumber() == state.getTestSet().getTestResults().size()) {
                    return; // done testing mark but plan before test result
                }
                testResult.setTestNumber(state.getTestSet().getNextTestNumber());
            }

            state.getTestSet().addTestResult(testResult);

            if (prevState != null && enableSubtests) {
                state.getTestSet().getTestResults().get(
                        state.getTestSet().getNumberOfTestResults() - 1)
                        .setSubtest(prevState.getTestSet());
            }

            if (indentation == 0 && enableSubtests) {
                TestResult currLast = state.getTestSet().getTestResults().get(
                            state.getTestSet().getNumberOfTestResults() - 1);
                while (!subStack.empty()) {
                    StreamStatus nextLevel = subStack.pop();
                    currLast.setSubtest(nextLevel.getTestSet());
                    currLast = nextLevel.getTestSet().getTestResults().get(0);
                }
            }

        } else if (tapElement instanceof Footer) {

            state.getTestSet().setFooter((Footer) tapElement);

        } else if (tapElement instanceof BailOut) {

            state.getTestSet().addBailOut((BailOut) tapElement);

        } else if (tapElement instanceof Comment) {

            final Comment comment = (Comment) tapElement;

            state.getTestSet().addComment(comment);

            if (state.getLastParsedElement() instanceof TestResult) {
                ((TestResult) state.getLastParsedElement()).addComment(comment);
            }
        }

        state.setFirstLine(false);
        if (!(tapElement instanceof Comment)) {
            state.setLastParsedElement(tapElement);
        }
    }
1224564
def _prt_line_detail(self, prt, values, lnum=""):
        """"""
        #### data = zip(self.req_str, self.ntgafobj._fields, values)
        data = zip(self.req_str, self.flds, values)
        txt = ["{:2}) {:3} {:20} {}".format(i, req, hdr, val) for i, (req, hdr, val) in enumerate(data)]
        prt.write("{LNUM}\n{TXT}\n".format(LNUM=lnum, TXT="\n".join(txt)))
697148
def populate(line, msg)
      @line = line
      @sequence = msg['sequence']
      @depth = msg['depth']
      @cmd = msg['cmd']
      @kind = msg['kind']
      @msg = msg['msg']
      @key = msg['key']
    end
696101
public static void printDetail(Class<?> c, String msg) {
		if(Logger.printDetails) {
			String preamble;
			if(c != null)
				preamble = "["+c.getSimpleName()+"]";
			else
				preamble = "";
			
			synchronized(System.err) {
				System.err.println(preamble+" "+msg);
			}
		}
	}