Package ro.isdc.wro

Examples of ro.isdc.wro.WroRuntimeException


      stopWatch.start("parseScript");
      final WroModel model = GroovyModelParser.parse(script);
      stopWatch.stop();
      LOG.debug("groovy model: {}", model);
      if (model == null) {
        throw new WroRuntimeException("Invalid content provided, cannot build model!");
      }
      return model;
    } catch (final IOException e) {
      throw new WroRuntimeException("Invalid model found!", e);
    } finally {
      LOG.debug(stopWatch.prettyPrint());
    }
  }
View Full Code Here


        final String compileError = result;
        LOG.error("exitStatus: {}", exitStatus);
        // find a way to get rid of escape character found at the end (minor issue)
        final String errorMessage = MessageFormat.format("Error in CoffeeScript: \n{0}",
            compileError.replace(temp.getPath(), resourceUri));
        throw new WroRuntimeException(errorMessage);
      }
      //the result is compiled in the same file
      return result;
    } catch (final Exception e) {
      throw WroRuntimeException.wrap(e);
View Full Code Here

      } else {
        builder = RhinoScriptBuilder.newChain(scope);
      }
      return builder;
    } catch (final IOException ex) {
      throw new WroRuntimeException("Failed reading init script", ex);
    }
  }
View Full Code Here

      // When auto detect is turned on, do not skip trying.. because the auto detection assume that the wro file name
      // can be wrong.
      if (autoDetectWroFile) {
        throw e;
      }
      throw new WroRuntimeException("The wroFile doesn't exist. Skip trying with other wro model factories", e);
    }
  }
View Full Code Here

      if (exitStatus != 0) {
        LOG.error("exitStatus: {}", exitStatus);
        // find a way to get rid of escape character found at the end (minor issue)
        final String errorMessage = MessageFormat.format("Error in LESS: \n{0}",
            result.replace(temp.getPath(), resourceUri));
        throw new WroRuntimeException(errorMessage);
      }
      return result;
    } catch (final Exception e) {
      throw WroRuntimeException.wrap(e);
    } finally {
View Full Code Here

          }
        }
      }
      LOG.error(logMessageBuffer.toString());
    }
    throw new WroRuntimeException("Cannot create model using any of provided factories");
  }
View Full Code Here

    final StringBuilder sb = new StringBuilder();
    for (final Object error : errors) {
      sb.append(error.toString()).append("\n");
    }
    LOG.debug("Compilation errors: {}", sb);
    throw new WroRuntimeException(sb.toString());
  }
View Full Code Here

      } else {
        builder = RhinoScriptBuilder.newChain(scope);
      }
      return builder;
    } catch (final IOException ex) {
      throw new WroRuntimeException("Failed reading init script", ex);
    }
  }
View Full Code Here

        builder = RhinoScriptBuilder.newChain(scope);
      }
      return builder;
    } catch (final Exception e) {
      LOG.error("Processing error:" + e.getMessage(), e);
      throw new WroRuntimeException("Processing error", e);
    }
  }
View Full Code Here

    String optionValue = Boolean.TRUE.toString();
    if (option.contains(":")) {
      final String message = String.format("Invalid option: '%s'. Expected format: key=value or key=['v1','v2']",
          option);
      LOG.error(message);
      throw new WroRuntimeException(message);
    }
    if (option.contains("=")) {
      final String[] optionEntry = option.split("=");
      if (optionEntry.length != 2) {
        throw new IllegalArgumentException("Invalid option provided: " + option);
View Full Code Here

TOP

Related Classes of ro.isdc.wro.WroRuntimeException

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.