Package org.bladerunnerjs.model.exception

Examples of org.bladerunnerjs.model.exception.InvalidRequirePathException


                    String relativePathFromAssetContainer = RelativePathUtility.get(assetLocation.root().getFileInfoAccessor(), createdAsset.assetLocation().assetContainer().dir(), createdAsset.dir());
                    String relativeRequirePathPathFromAssetContainer = StringUtils.substringAfter(relativePathFromAssetContainer, "/"); // strip of 'src/' at the start of the relative path
                    String appRequirePrefix = assetLocation.assetContainer().app().getRequirePrefix();
                    String createdAssetContainerRequirePrefix = createdAsset.assetLocation().assetContainer().requirePrefix();
                    if (relativeRequirePathPathFromAssetContainer.startsWith(appRequirePrefix) && !relativeRequirePathPathFromAssetContainer.startsWith(createdAssetContainerRequirePrefix)) {
                      InvalidRequirePathException wrappedRequirePathException = new InvalidRequirePathException(
                          "The source module at '"+createdAsset.getAssetPath()+"' is in an invalid location. "+
                          "It's require path starts with the apps require prefix ('"+appRequirePrefix+"') which suggests it's require path is intended to be '"+createdAssetContainerRequirePrefix+"'. "+
                          "The require path defined by the source modules location is '"+relativeRequirePathPathFromAssetContainer+"'. Either it's package structure should be '"+createdAssetContainerRequirePrefix+"/*' or "+
                          "remove the folders '"+relativeRequirePathPathFromAssetContainer+"' to allow the require prefix to be calculated automatically.");
                      throw new RuntimeException(wrappedRequirePathException);
View Full Code Here

TOP

Related Classes of org.bladerunnerjs.model.exception.InvalidRequirePathException

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.