/** * This version of toString() uses the _params instance variable * to format the message. If the <code>_code</code> is negative * the use _message as the error string. */ public String toString() { String suffix = (_params == null) ? (null != _code ? getErrorMessage() : _message) : MessageFormat.format(getErrorMessage(), _params); return formatLine() + suffix; }
public ErrorMsg(String code, SyntaxTreeNode node) { _code = code; _url = getFileName(node); _line = node.getLineNumber(); }
/** * Pass warning messages from the compiler to the error listener */ private void passWarningsToListener(Vector messages) throws TransformerException { if (_errorListener == null || messages == null) { return; } // Pass messages to listener, one by one final int count = messages.size(); for (int pos = 0; pos < count; pos++) { ErrorMsg msg = (ErrorMsg)messages.elementAt(pos); // Workaround for the TCK failure ErrorListener.errorTests.error001. if (msg.isWarningError()) _errorListener.error( new TransformerConfigurationException(msg.toString())); else _errorListener.warning( new TransformerConfigurationException(msg.toString())); } }
public TypeCheckError(String code, Object param1, Object param2) { super(); _error = new ErrorMsg(code, param1, param2); }
new ErrorMsg(ErrorMsg.ILLEGAL_ATTRIBUTE_ERR, attrQName, node); err.setWarningError(true); reportError(WARNING, err);
public TypeCheckError(String code, Object param) { super(); _error = new ErrorMsg(code, param); }
/** * javax.xml.transform.sax.TransformerFactory implementation. * Set the error event listener for the TransformerFactory, which is used * for the processing of transformation instructions, and not for the * transformation itself. * * @param listener The error listener to use with the TransformerFactory * @throws IllegalArgumentException */ public void setErrorListener(ErrorListener listener) throws IllegalArgumentException { if (listener == null) { ErrorMsg err = new ErrorMsg(ErrorMsg.ERROR_LISTENER_NULL_ERR, "TransformerFactory"); throw new IllegalArgumentException(err.toString()); } _errorListener = listener; }
public String toString(Object obj) { Object params[] = new Object[1]; params[0] = obj.toString(); String suffix = MessageFormat.format(getErrorMessage(), params); return formatLine() + suffix; }
public static void printUsage() { System.err.println(new ErrorMsg(ErrorMsg.TRANSFORM_USAGE_STR)); }
public ErrorMsg(String code, Object param1, Object param2, SyntaxTreeNode node) { _code = code; _url = getFileName(node); _line = node.getLineNumber(); _params = new Object[2]; _params[0] = param1; _params[1] = param2; }
/** * Implements JAXP's Transformer.setOutputProperty(). * Get an output property that is in effect for the transformation. The * property specified may be a property that was set with * setOutputProperty(), or it may be a property specified in the stylesheet. * * @param name The name of the property to set * @param value The value to assign to the property * @throws IllegalArgumentException Never, errors are ignored */ public void setOutputProperty(String name, String value) throws IllegalArgumentException { if (!validOutputProperty(name)) { ErrorMsg err = new ErrorMsg(ErrorMsg.JAXP_UNKNOWN_PROP_ERR, name); throw new IllegalArgumentException(err.toString()); } _properties.setProperty(name, value); }
public String toString(Object obj0, Object obj1) { Object params[] = new Object[2]; params[0] = obj0.toString(); params[1] = obj1.toString(); String suffix = MessageFormat.format(getErrorMessage(), params); return formatLine() + suffix; }
public static void printUsage() { StringBuffer vers = new StringBuffer("XSLTC version " + VERSION_MAJOR + "." + VERSION_MINOR + ((VERSION_DELTA > 0) ? ("." + VERSION_DELTA) : (""))); System.err.println(vers + "\n" + new ErrorMsg(ErrorMsg.COMPILE_USAGE_STR)); }
public ErrorMsg(String code, Object param1, SyntaxTreeNode node) { _code = code; _url = getFileName(node); _line = node.getLineNumber(); _params = new Object[1]; _params[0] = param1; }
/** * Implements JAXP's Transformer.getOutputProperty(). * Get an output property that is in effect for the transformation. The * property specified may be a property that was set with setOutputProperty, * or it may be a property specified in the stylesheet. * * @param name A non-null string that contains the name of the property * @throws IllegalArgumentException if the property name is not known */ public String getOutputProperty(String name) throws IllegalArgumentException { if (!validOutputProperty(name)) { ErrorMsg err = new ErrorMsg(ErrorMsg.JAXP_UNKNOWN_PROP_ERR, name); throw new IllegalArgumentException(err.toString()); } return _properties.getProperty(name); }
/** * This version of toString() uses the _params instance variable * to format the message. If the <code>_code</code> is negative * the use _message as the error string. */ public String toString() { String suffix = (_params == null) ? (null != _code ? getErrorMessage() : _message) : MessageFormat.format(getErrorMessage(), _params); return formatLine() + suffix; }
/** * Prints all compile-time warnings */ public void printWarnings() { final int size = _warnings.size(); if (size > 0) { System.err.println(new ErrorMsg(ErrorMsg.COMPILER_WARNING_KEY)); for (int i = 0; i < size; i++) { System.err.println(" " + _warnings.elementAt(i)); } } }
public ErrorMsg(String code, Object param1, Object param2, SyntaxTreeNode node) { _code = code; _url = getFileName(node); _line = node.getLineNumber(); _params = new Object[2]; _params[0] = param1; _params[1] = param2; }