List of usage examples for javax.xml.transform TransformerConfigurationException getStackTrace
public StackTraceElement[] getStackTrace()
From source file:org.forgerock.doc.maven.ImageDataTransformer.java
/** * Construct an updater to match DocBook XML files. * * <p>//from w w w .j a v a 2s .c o m * * The files are updated in place. * * <p> * The following example shows how this might be used in your code with * tools from Apache Commons. * <pre> * File xmlSourceDirectory = new File("/path/to/xml/files/"); * * // Match normal directories, and XML files. * IOFileFilter dirFilter = FileFilterUtils * .and(FileFilterUtils.directoryFileFilter(), * HiddenFileFilter.VISIBLE); * IOFileFilter fileFilter = FileFilterUtils.and( * FileFilterUtils.fileFileFilter(), * FileFilterUtils.suffixFileFilter(".xml")); * FileFilter filterToMatch = FileFilterUtils.or(dirFilter, fileFilter); * * // Update XML files. * ImageDataTransformer idt = new ImageDataTransformer(filterToMatch); * return idt.update(xmlSourceDirectory); * </pre> * * @param filterToMatch Filter to match XML files. */ public ImageDataTransformer(final FileFilter filterToMatch) { super(filterToMatch, -1); try { this.transformer = getTransformer(); } catch (IOException ie) { System.err.println(ie.getStackTrace()); System.exit(1); } catch (TransformerConfigurationException tce) { System.err.println(tce.getStackTrace()); System.exit(1); } }