/* * Get the error message with location information * appended. * * @return A <code>String</code> representing the error message with * location information appended. */ public String getMessageAndLocation() { java.lang.StringBuffer sbuffer = new java.lang.StringBuffer(); String message = base.getMessage(); if (null != message) { sbuffer.append(message); } if (null != locator) { String systemID = locator.getSystemId(); int line = locator.getLineNumber(); int column = locator.getColumnNumber(); if (null != systemID) { sbuffer.append("; SystemID: "); sbuffer.append(systemID); } if (0 != line) { sbuffer.append("; Line#: "); sbuffer.append(line); } if (0 != column) { sbuffer.append("; Column#: "); sbuffer.append(column); } } return(sbuffer.toString()); }
private string LocationString(SourceLocator sourceLocator) { return(sourceLocator == null ? $"In '{this.StylesheetPath}'." : $"At line '{sourceLocator.getLineNumber()}', column '{sourceLocator.getColumnNumber()}' of '{sourceLocator.getSystemId()}'."); }