MessageFormatter messageFormatter = getMessageFormatter(domain); String message; if (messageFormatter != null) { message = messageFormatter.formatMessage(fLocale, key, arguments); } else { StringBuffer str = new StringBuffer(); str.append(domain); str.append('#'); str.append(key); int argCount = arguments != null ? arguments.length : 0; if (argCount > 0) { str.append('?'); for (int i = 0; i < argCount; i++) { str.append(arguments[i]); if (i < argCount -1) { str.append('&'); } } } message = str.toString(); } XMLParseException parseException = new XMLParseException(location, message);   XMLErrorHandler errorHandler = fErrorHandler; if (errorHandler == null) { if (fDefaultErrorHandler == null) { fDefaultErrorHandler = new DefaultErrorHandler(); } errorHandler = fDefaultErrorHandler; }   switch (severity) { case SEVERITY_WARNING: { errorHandler.warning(domain, key, parseException); break; } case SEVERITY_ERROR: { errorHandler.error(domain, key, parseException); break; } case SEVERITY_FATAL_ERROR: { errorHandler.fatalError(domain, key, parseException); if (!fContinueAfterFatalError) { throw parseException; } break; } }  }
reportError(fLocator, domain, key, arguments, severity); }
    public void reportError(XMLLocator location,                            String domain, String key, Object[] arguments,                             short severity) throws XNIException {        // REVISIT: [Q] Should we do anything about invalid severity        //              parameter? -Ac                // format error message and create parse exception        MessageFormatter messageFormatter = getMessageFormatter(domain);        String message;        if (messageFormatter != null) {            message = messageFormatter.formatMessage(fLocale, key, arguments);        }        else {            StringBuffer str = new StringBuffer();            str.append(domain);            str.append('#');            str.append(key);            int argCount = arguments != null ? arguments.length : 0;            if (argCount > 0) {                str.append('?');                for (int i = 0; i < argCount; i++) {                    str.append(arguments[i]);                    if (i < argCount -1) {                        str.append('&');                    }                }            }            message = str.toString();        }        XMLParseException parseException =             new XMLParseException(location, message);        // get error handler        XMLErrorHandler errorHandler = fErrorHandler;        if (errorHandler == null) {            if (fDefaultErrorHandler == null) {                fDefaultErrorHandler = new DefaultErrorHandler();            }            errorHandler = fDefaultErrorHandler;        }        // call error handler        switch (severity) {            case SEVERITY_WARNING: {                errorHandler.warning(domain, key, parseException);                break;            }            case SEVERITY_ERROR: {                errorHandler.error(domain, key, parseException);                break;            }            case SEVERITY_FATAL_ERROR: {                errorHandler.fatalError(domain, key, parseException);                if (!fContinueAfterFatalError) {                    throw parseException;                }                break;            }        }    } // reportError(XMLLocator,String,String,Object[],short)