Package org.jboss.arquillian.graphene.location.exception

Examples of org.jboss.arquillian.graphene.location.exception.LocationException


        }

        try {
            return uri.toURL().toExternalForm();
        } catch (MalformedURLException ex) {
            throw new LocationException(String.format("Location you want to decide (%s) can not be "
                + "converted to URL.", location));
        }
    }
View Full Code Here


        if (contextRoot != null) {
            try {
                return new URL(contextRoot, location).toExternalForm();
            } catch (MalformedURLException ex) {
                throw new LocationException("URL to construct is malformed.", ex.getCause());
            }
        }

        throw new LocationException(String.format(
            "The location %s is not valid URI and no contextRoot was discovered to treat it as relative URL",
            location));
    }
View Full Code Here

        URI uri = null;

        try {
            uri = new URI(location);
        } catch (URISyntaxException ex) {
            throw new LocationException(String.format("Unable to convert '%s' to URI", location), ex.getCause());
        }

        String resourceName = uri.getSchemeSpecificPart();

        if (resourceName.startsWith("//")) {
View Full Code Here

            if (!file.exists()) {
                throw new IllegalArgumentException(String.format("File specified by %s was not found", location));
            }
            return fileToUrl(file).toExternalForm();
        } catch (URISyntaxException ex) {
            throw new LocationException(String.format("Unable to convert '%s' to URI", location), ex.getCause());
        }

    }
View Full Code Here

TOP

Related Classes of org.jboss.arquillian.graphene.location.exception.LocationException

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.