Package org.apache.commons.configuration.ex

Examples of org.apache.commons.configuration.ex.ConfigurationException


        {
            url = FileLocatorUtils.toURL(file);
        }
        catch (MalformedURLException e1)
        {
            throw new ConfigurationException("Cannot create URL from file "
                    + file);
        }

        load(url);
    }
View Full Code Here


        {
            throw e;
        }
        catch (Exception e)
        {
            throw new ConfigurationException(
                    "Unable to load the configuration from the URL " + url, e);
        }
        finally
        {
            closeSilent(in);
View Full Code Here

        {
            ((InputStreamSupport) getContent()).read(in);
        }
        catch (IOException e)
        {
            throw new ConfigurationException(e);
        }
    }
View Full Code Here

            getNodeModel().mergeRoot(handler.getResultBuilder().createNode(),
                    null, null, null, this);
        }
        catch (Exception e)
        {
            throw new ConfigurationException(
                    "Unable to parse the configuration file", e);
        }
    }
View Full Code Here

            {
                reader = new InputStreamReader(in, encoding);
            }
            catch (UnsupportedEncodingException e)
            {
                throw new ConfigurationException(
                        "The requested encoding is not supported, try the default encoding.",
                        e);
            }
        }
View Full Code Here

        {
            getContent().read(in);
        }
        catch (IOException ioex)
        {
            throw new ConfigurationException(ioex);
        }
        finally
        {
            fireLoadedEvent();
        }
View Full Code Here

     */
    private void save(FileLocator locator) throws ConfigurationException
    {
        if (!FileLocatorUtils.isLocationDefined(locator))
        {
            throw new ConfigurationException("No file location has been set!");
        }

        if (locator.getSourceURL() != null)
        {
            save(locator.getSourceURL(), locator);
View Full Code Here

        {
            ConfigurationBuilderProvider provider =
                    providerForTag(src.getRootElementName());
            if (provider == null)
            {
                throw new ConfigurationException(
                        "Unsupported configuration source: "
                                + src.getRootElementName());
            }

            ConfigurationBuilder<? extends Configuration> builder =
View Full Code Here

        {
            throw cex;
        }
        catch (Exception ex)
        {
            throw new ConfigurationException(ex);
        }
    }
View Full Code Here

    {
        if (decl.isReload())
        {
            if (getReloadingBuilderClass() == null)
            {
                throw new ConfigurationException(
                        "No support for reloading for builder class "
                                + getBuilderClass());
            }
            return getReloadingBuilderClass();
        }
View Full Code Here

TOP

Related Classes of org.apache.commons.configuration.ex.ConfigurationException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.