Example usage for javax.xml.transform TransformerFactoryConfigurationError TransformerFactoryConfigurationError

List of usage examples for javax.xml.transform TransformerFactoryConfigurationError TransformerFactoryConfigurationError

Introduction

In this page you can find the example usage for javax.xml.transform TransformerFactoryConfigurationError TransformerFactoryConfigurationError.

Prototype

public TransformerFactoryConfigurationError(Exception e, String msg) 

Source Link

Document

Create a new TransformerFactoryConfigurationError with the given Exception base cause and detail message.

Usage

From source file:ee.kovmen.xtee.consumer.CustomTransformerObjectSupport.java

/**
 * Instantiate a new TransformerFactory.
 * <p>The default implementation simply calls {@link TransformerFactory#newInstance()}.
 * If a {@link #setTransformerFactoryClass "transformerFactoryClass"} has been specified explicitly,
 * the default constructor of the specified class will be called instead.
 * <p>Can be overridden in subclasses.
 * @param transformerFactoryClass the specified factory class (if any)
 * @return the new TransactionFactory instance
 * @see #setTransformerFactoryClass/*from  w  w  w .  j  a  v a  2 s .  c o m*/
 * @see #getTransformerFactory()
 */
protected TransformerFactory newTransformerFactory(Class transformerFactoryClass) {
    if (transformerFactoryClass != null) {
        try {
            return (TransformerFactory) transformerFactoryClass.newInstance();
        } catch (Exception ex) {
            throw new TransformerFactoryConfigurationError(ex, "Could not instantiate TransformerFactory");
        }
    } else {
        return TransformerFactory.newInstance();
    }
}