throw new XmlException(e.getMessage(), e); doc2 = DocumentHelper.readDocument(is2); } catch (SAXException e) { throw new XmlException(e.getMessage(), e);
public PackagePart getSlideMasterPart(CTSlideMasterIdListEntry master) throws IOException, XmlException { try { PackagePart corePart = getCorePart(); return corePart.getRelatedPart( corePart.getRelationship(master.getId2()) ); } catch(InvalidFormatException e) { throw new XmlException(e); } } /**
public PackagePart getSlidePart(CTSlideIdListEntry slide) throws IOException, XmlException { try { PackagePart corePart = getCorePart(); return corePart.getRelatedPart(corePart.getRelationship(slide.getId2())); } catch(InvalidFormatException e) { throw new XmlException(e); } } /**
private static XmlException wrappedException(Throwable e) { if (e instanceof XmlException) return (XmlException) e; return new XmlException( e.getMessage(), e ); }
/** * set up this contiguous set of characters to be escaped in * output documents according to the given mode */ public void addMappings(char ch1, char ch2, int mode) throws XmlException { if (ch1 > ch2) { throw new XmlException("XmlOptionCharEscapeMap.addMappings(): " + "ch1 must be <= ch2"); } for (char c = ch1; c <= ch2; c++) { addMapping(c, mode); } }
if ( replString == null ) throw new XmlException("XmlOptionCharEscapeMap.addMapping(): " + "the PREDEF_ENTITY mode can only be used for the following " + "characters: <, >, &, \" and '"); throw new XmlException("XmlOptionCharEscapeMap.addMapping(): " + "mode must be PREDEF_ENTITY, DECIMAL or HEXADECIMAL");
public Dom load(String s, XmlOptions options) throws XmlException { Reader r = new StringReader(s); try { return load(r, options); } catch (IOException e) { assert false: "StringReader should not throw IOException"; throw new XmlException(e.getMessage(), e); } finally { try { r.close(); } catch (IOException e) { } } }
Cur parse(String s, SchemaType type, XmlOptions options) throws XmlException { Reader r = new StringReader(s); try { Cur c = getSaxLoader(options).load(this, new InputSource(r), options); autoTypeDocument(c, type, options); return c; } catch (IOException e) { assert false: "StringReader should not throw IOException"; throw new XmlException(e.getMessage(), e); } finally { try { r.close(); } catch (IOException e) { } } }
public XmlObject parseToXmlObject(XMLStreamReader xsr, SchemaType type, XmlOptions options) throws XmlException { Cur c; try { c = loadXMLStreamReader(xsr, options); } catch (XMLStreamException e) { throw new XmlException(e.getMessage(), e); } autoTypeDocument(c, type, options); XmlObject x = (XmlObject) c.getUser(); c.release(); return x; }
throw new XmlException(err.toString(), null, err);
throw new XmlException(err.toString(), null, err);
throw new XmlException(e); e.getLineNumber(), e.getColumnNumber(), -1); throw new XmlException(err.toString(), e, err); throw new XmlException(err.toString(), e, err);
schemas.add(((SchemaDocument)input[i]).getSchema()); else throw new XmlException("Thread " + Thread.currentThread().getName() + ": The " + i + "th supplied input is not a schema document: its type is " + input[i].schemaType()); throw new XmlException(errorWatcher.firstError());
/** * @deprecated XMLInputStream was deprecated by XMLStreamReader from STaX - jsr173 API. */ public XmlObject parseToXmlObject(XMLInputStream xis, SchemaType type, XmlOptions options) throws XmlException, org.apache.xmlbeans.xml.stream.XMLStreamException { Cur c; try { c = loadXMLInputStream(xis, options); } catch (org.apache.xmlbeans.xml.stream.XMLStreamException e) { throw new XmlException(e.getMessage(), e); } autoTypeDocument(c, type, options); XmlObject x = (XmlObject) c.getUser(); c.release(); return x; }
throw new XmlException(XmlError.forObject("Unexpected file role", filedescs[j]));
private static SaxLoader getSaxLoader(XmlOptions options) throws XmlException { options = XmlOptions.maskNull(options); EntityResolver er = null; if (!options.hasOption(XmlOptions.LOAD_USE_DEFAULT_RESOLVER)) { er = (EntityResolver) options.get(XmlOptions.ENTITY_RESOLVER); if (er == null) er = ResolverUtil.getGlobalEntityResolver(); if (er == null) er = new DefaultEntityResolver(); } XMLReader xr = (XMLReader) options.get( XmlOptions.LOAD_USE_XMLREADER); if (xr == null) { try { xr = SAXHelper.newXMLReader(new XmlOptionsBean(options)); } catch(Exception e) { throw new XmlException("Problem creating XMLReader", e); } } SaxLoader sl = new XmlReaderSaxLoader(xr); // I've noticed that most XMLReaders don't like a null EntityResolver... if (er != null) xr.setEntityResolver(er); return sl; }
throw new XmlException(e);
strings = new XSSFBSharedStringsTable(container); } catch (InvalidFormatException e) { throw new XmlException(e); } catch (OpenXML4JException oe) { throw new XmlException(oe);
strings = new ReadOnlySharedStringsTable(container, config.getConcatenatePhoneticRuns()); } catch (InvalidFormatException e) { throw new XmlException(e); } catch (OpenXML4JException oe) { throw new XmlException(oe);
new XmlException("Element " + QNameHelper.pretty(docElemName) + " is not a valid " +