throw new ConfigurationError( "Provider for " + factoryId + " cannot be found", null);
throw new FactoryConfigurationError(e.getException(), e.getMessage());
throw new FactoryConfigurationError(e.getException(), e.getMessage());
return instance; } catch (ClassNotFoundException x) { throw new ConfigurationError( "Provider " + className + " not found", x); } catch (Exception x) { throw new ConfigurationError( "Provider " + className + " could not be instantiated: " + x, x);
throw new FactoryConfigurationError(e.getException(), e.getMessage());
throw new FactoryConfigurationError(e.getException(), e.getMessage());
throw new ConfigurationError( "Provider for " + factoryId + " cannot be found", null);
throw new FactoryConfigurationError(e.getException(), e.getMessage());
throw new FactoryConfigurationError(e.getException(), e.getMessage());
throw new ConfigurationError( "Provider " + className + " not found", x); throw new ConfigurationError( "Provider " + className + " could not be instantiated: " + x, x);
/** * @return New instance of a <code>DocumentBuilderFactory</code> * * @exception FactoryConfigurationError if the implementation is not * available or cannot be instantiated. */ public static DocumentBuilderFactory newInstance(String factoryClassName, ClassLoader classLoader) { if (factoryClassName == null) { throw new FactoryConfigurationError("factoryClassName cannot be null."); } if (classLoader == null) { classLoader = SecuritySupport.getContextClassLoader(); } try { return (DocumentBuilderFactory) FactoryFinder.newInstance(factoryClassName, classLoader, false); } catch (FactoryFinder.ConfigurationError e) { throw new FactoryConfigurationError(e.getException(), e.getMessage()); } }
/** * @return A new instance of a SAXParserFactory. * * @exception FactoryConfigurationError if the implementation is * not available or cannot be instantiated. */ public static SAXParserFactory newInstance(String factoryClassName, ClassLoader classLoader) { if (factoryClassName == null) { throw new FactoryConfigurationError("factoryClassName cannot be null."); } if (classLoader == null) { classLoader = SecuritySupport.getContextClassLoader(); } try { return (SAXParserFactory) FactoryFinder.newInstance(factoryClassName, classLoader, false); } catch (FactoryFinder.ConfigurationError e) { throw new FactoryConfigurationError(e.getException(), e.getMessage()); } }