/** * Returns the line number of the end of the text where the * parse error occurred. * <p> * The first line in the document is line 1.</p> * * @return an integer representing the line number, or -1 * if the information is not available. */ public int getLineNumber() { return (getCause() instanceof JDOMParseException)? ((JDOMParseException)getCause()).getLineNumber(): -1; }
/** * Returns the line number of the end of the text where the * parse error occurred. * <p> * The first line in the document is line 1.</p> * * @return an integer representing the line number, or -1 * if the information is not available. */ public int getLineNumber() { return (getCause() instanceof JDOMParseException)? ((JDOMParseException)getCause()).getLineNumber(): -1; }
/** * Returns the line number of the end of the text where the parse error occurred. * <p> * The first line in the document is line 1. * </p> * * @return an integer representing the line number, or -1 if the information is not available. */ public int getLineNumber() { if (getCause() instanceof JDOMParseException) { return ((JDOMParseException) getCause()).getLineNumber(); } else { return -1; } }
/** * Returns the line number of the end of the text where the parse error occurred. * <p> * The first line in the document is line 1. * </p> * * @return an integer representing the line number, or -1 if the information is not available. */ public int getLineNumber() { if (getCause() instanceof JDOMParseException) { return ((JDOMParseException) getCause()).getLineNumber(); } else { return -1; } }
int lineNum = e.getLineNumber(); if ( lineNum != -1 ) { int badStart = -1;
private PluginCreator loadDescriptorFromDescriptorFile(@NotNull String descriptorPath, @NotNull File pluginDirectory, @NotNull File descriptorFile, boolean validateDescriptor) { try { URL documentUrl = URLUtil.fileToUrl(descriptorFile); Document document = JDOMUtil.loadDocument(documentUrl); return new PluginCreator(descriptorPath, validateDescriptor, document, documentUrl, myPathResolver, pluginDirectory); } catch (JDOMParseException e) { int lineNumber = e.getLineNumber(); String message = lineNumber != -1 ? "unexpected element on line " + lineNumber : "unexpected elements"; return new PluginCreator(descriptorPath, new UnexpectedDescriptorElements(descriptorPath, message), pluginDirectory); } catch (Exception e) { LOG.debug("Unable to read plugin descriptor " + descriptorPath + " of plugin " + descriptorFile, e); return new PluginCreator(descriptorPath, new UnableToReadDescriptor(descriptorPath), pluginDirectory); } }
int lineNum = e.getLineNumber(); if ( lineNum != -1 ) { int badStart = -1;