Package org.codehaus.dna

Examples of org.codehaus.dna.ConfigurationException


    public void testConfigurationExceptionToStringWithEmptyLocation()
        throws Exception
    {
        final String path = "/my/path";
        final ConfigurationException exception =
            new ConfigurationException( "myMessage", path, "" );

        final String expected =
            "org.codehaus.dna.ConfigurationException: myMessage" +
            " - " + path;

        assertEquals( expected, exception.toString() );
    }
View Full Code Here


    }

    public void testConfigurationExceptionToStringWithEmptyLocationAndPath()
        throws Exception
    {
        final ConfigurationException exception =
            new ConfigurationException( "myMessage", "", "" );

        final String expected =
            "org.codehaus.dna.ConfigurationException: myMessage";

        assertEquals( expected, exception.toString() );
    }
View Full Code Here

            {
                return baseKids[ 0 ];
            }
            else
            {
                throw new ConfigurationException( "Unable to merge configuration item, "
                                                  +
                                                  "multiple matches on child or base [name: "
                                                  + toMerge.getName() + "]",
                                                  toMerge.getPath(),
                                                  toMerge.getLocation() );
View Full Code Here

                {
                    mergedWith = matches[ 0 ];
                }
                else
                {
                    throw new ConfigurationException( "Multiple children in base with name '"
                                                      +
                                                      name +
                                                      "' and attr '" +
                                                      keyAttr
                                                      + " = " + keyValue + "'",
View Full Code Here

                    {
                        uniqueAttr = attr;
                    }
                    else
                    {
                        throw new ConfigurationException(
                            "Multiple unique attributes for child "
                            +
                            "[name: " +
                            c[ 0 ].getName()
                            +
                            ", unique1: " +
                            uniqueAttr
                            +
                            ", unique2: " +
                            attr +
                            "]",
                            "",
                            "" );
                    }
                }
                else
                {
                    testedAttributes.add( attr );
                }
            }
        }

        if( null == uniqueAttr )
        {
            throw new ConfigurationException(
                "Unable to find unique attribute for "
                +
                "children of name: " +
                c[ 0 ].getName(),
                c[ 0 ].getPath(),
View Full Code Here

            verifier.verifyPolicy( policy );
            return builder.buildPolicy( policy, resolver );
        }
        catch( final Exception e )
        {
            throw new ConfigurationException( e.getMessage(), e );
        }
    }
View Full Code Here

        {
            final String message = REZ.format(
                "legacy.bad-toplevel-element.error",
                type.getName(),
                topLevelName );
            throw new ConfigurationException( message,
                                              info.getPath(),
                                              info.getLocation() );
        }

        Configuration configuration;
View Full Code Here

        catch( IOException e )
        {
            final String message = REZ.format( "config.error.dir.invalid",
                                               m_storageDirectory );

            throw new ConfigurationException( message, e );
        }

        m_debugPath =
        configuration.getChild( "debug-output-path" ).getValue( null );
    }
View Full Code Here

TOP

Related Classes of org.codehaus.dna.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.