Example usage for org.apache.commons.configuration ConfigurationException ConfigurationException

List of usage examples for org.apache.commons.configuration ConfigurationException ConfigurationException

Introduction

In this page you can find the example usage for org.apache.commons.configuration ConfigurationException ConfigurationException.

Prototype

public ConfigurationException() 

Source Link

Document

Constructs a new ConfigurationException without specified detail message.

Usage

From source file:com.w20e.socrates.config.ConfigurationResource.java

/**
 * Get the global configuration.//from  w w  w  .  j a  v  a2 s  .  com
 * 
 * @return a <code>Configuration</code> value
 * @exception ConfigurationException
 *                if an error occurs
 * @todo Do we actually need this?
 */
public Configuration getConfiguration() throws ConfigurationException {

    // First try system var
    if (System.getProperty("socrates.config.url") != null) {

        try {
            return getConfiguration(new URL(System.getProperty("socrates.config.url")));
        } catch (MalformedURLException mfue) {
            throw new ConfigurationException();
        }
    }
    // Resource from class path
    return getConfiguration(getClass().getResource("/socrates.xml"));
}