Package org.bladerunnerjs.model.exception

Examples of org.bladerunnerjs.model.exception.ConfigException


     
      for(ConstraintViolation<T> validationError : validationErrors) {
        failureMessage.append("\n\t").append("'" + validationError.getPropertyPath() + "' " + validationError.getMessage());
      }
     
      throw new ConfigException(failureMessage.toString());
    }
  }
View Full Code Here


    }
   
    if (!requirePrefix.matches(REQUIRE_PREFIX_REGEX))
    {
      String manifestPath = RelativePathUtility.get(node.root().getFileInfoAccessor(), this.node.root().dir(), getUnderlyingFile());
      throw new ConfigException( String.format(Messages.INVALID_REQUIRE_PREFIX_EXCEPTION, requirePrefix, manifestPath, REQUIRE_PREFIX_REGEX) );
    }
  }
View Full Code Here

      for (String dependentLibName : manifest.getDepends())
      {
        JsLib dependentLib = bundlableNode.app().jsLib(dependentLibName);
        if (!dependentLib.dirExists())
        {
          throw new ConfigException(String.format("Library '%s' depends on the library '%s', which doesn't exist.", dir().getName(), dependentLibName)) ;
        }
        dependentLibs.addAll(dependentLib.linkedAssets());
      }
    }
    catch (ConfigException ex)
View Full Code Here

          reader.close();
        }
      }
    }
    catch(YamlReaderException e) {
      throw new ConfigException("Parse error while reading\n '" + confFile.getPath() + "':\n\n" +
                    e.getMessage() + "\n\n" +
                    "Please check to see that your properties have a space after the colon ':' as this is a common issue encounterd with YAML files.");
    }
    catch(IOException e) {
      throw new RuntimeException(e);
View Full Code Here

    verifyCharacterEncoding("defaultFileCharacterEncoding", defaultFileCharacterEncoding);
  }
 
  private void verifyCharacterEncoding(String propertyName, String characterEncoding) throws ConfigException {
    if(!Charset.isSupported(characterEncoding)) {
      throw new ConfigException("the '" + propertyName + "' in '" + getUnderlyingFile().getPath() + "' is specified as '" +
        characterEncoding + "' which is not a valid character encoding");
    }
  }
View Full Code Here

      ConfigValidationChecker.validate(this);
      NameValidator.assertValidPackageName(node, requirePrefix);
      verifyLocales(locales);
    }
    catch(InvalidPackageNameException e) {
      throw new ConfigException(e);
    }
  }
View Full Code Here

    try {
        String[] localeStrings = locales.split("\\s*,\\s*");
        for (int i = 0; i < localeStrings.length; i++) {
          Locale locale = new Locale(localeStrings[i]);
          if (locale.isEmptyLocale()) {
            throw new ConfigException("Locales cannot be empty and must be in the format " + Locale.LANGUAGE_AND_COUNTRY_CODE_FORMAT);
          }
        }
    } catch (IllegalArgumentException ex) {
      throw new ConfigException("Error in the config file " + getUnderlyingFile().getPath(), ex);
    }
  }
View Full Code Here

    try {
      ConfigValidationChecker.validate(this);
      NameValidator.assertValidPackageName(node, libNamespace);
    }
    catch(InvalidPackageNameException e) {
      throw new ConfigException(e);
    }
  }
View Full Code Here

     
      if(file.exists()){
        foundFiles.add(file);
      }else{
        String relativeManifestPath = RelativePathUtility.get(assetLocation.root().getFileInfoAccessor(), assetLocation.assetContainer().root().dir(), assetLocation.file(LIBRARY_MANIFEST_FILENAME));
        throw new ConfigException("Unable to find the file '" + filePath + "' required in the manifest at '" + relativeManifestPath + "'.");
      }
    }
    return foundFiles;
  }
View Full Code Here

TOP

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

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.