Package org.bladerunnerjs.aliasing

Examples of org.bladerunnerjs.aliasing.NamespaceException


    if(identifier == null)
    {
      String idMessage = (htmlAsset.assetLocation().assetContainer().isNamespaceEnforced()) ?
        "a namespaced ID of '" + NamespaceUtility.convertToNamespace(htmlAsset.assetLocation().requirePrefix()) + ".*'" : "an ID";
     
      throw new NamespaceException( "HTML template found without an identifier: '" +
          startTag.toString() + "'.  Root element should have " + idMessage + ".");
    }
   
    htmlAsset.assetLocation().assertIdentifierCorrectlyNamespaced(identifier);
   
    Asset assetWithDuplicateId = identifiers.get(identifier);
    if(assetWithDuplicateId == null){
      identifiers.put(identifier, htmlAsset);
    }else{
      throw new NamespaceException("HTML template found with a duplicate identifier: '" +
            identifier + "'. The same identifier is used for the file:\n'"
            + assetWithDuplicateId.getAssetPath()
            + "'.");
    }
  }
View Full Code Here


   
    try {
      reader.assertIdentifierCorrectlyNamespaced(identifier);
    }
    catch(RequirePathException e) {
      throw new NamespaceException("Require path exception while attempting to validate correctly namespaced identifier", e);
    }
   
    return identifier;
  }
View Full Code Here

TOP

Related Classes of org.bladerunnerjs.aliasing.NamespaceException

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.