Package com.google.clearsilver.jsilver.exceptions

Examples of com.google.clearsilver.jsilver.exceptions.JSilverBadSyntaxException


  public boolean readString(String content) {
    Parser hdfParser = dataFactory.getParser();
    try {
      hdfParser.parse(new StringReader(content), data, new Parser.ErrorHandler() {
        public void error(int line, String lineContent, String fileName, String errorMessage) {
          throw new JSilverBadSyntaxException("HDF parsing error : '" + errorMessage + "'",
              lineContent, fileName, line, JSilverBadSyntaxException.UNKNOWN_POSITION, null);
        }
      }, resourceLoader, null, options.getIgnoreAttributes());
      return true;
    } catch (IOException e) {
View Full Code Here


      throw new FileNotFoundException(dataFileName);
    }
    try {
      hdfParser.parse(reader, output, new Parser.ErrorHandler() {
        public void error(int line, String lineContent, String fileName, String errorMessage) {
          throw new JSilverBadSyntaxException("HDF parsing error : '" + errorMessage + "'",
              lineContent, fileName, line, JSilverBadSyntaxException.UNKNOWN_POSITION, null);
        }
      }, resourceLoader, dataFileName, ignoreAttributes);
    } finally {
      resourceLoader.close(reader);
View Full Code Here

      process(root, escapeMode, templateName);
      return new TemplateSyntaxTree(root);
    } catch (IOException exception) {
      throw new JSilverIOException(exception);
    } catch (ParserException exception) {
      throw new JSilverBadSyntaxException(exception.getMessage(), exception.getToken().getText(),
          templateName, exception.getToken().getLine(), exception.getToken().getPos(), exception);
    } catch (LexerException exception) {
      throw new JSilverBadSyntaxException(exception.getMessage(), null, templateName,
          JSilverBadSyntaxException.UNKNOWN_POSITION, JSilverBadSyntaxException.UNKNOWN_POSITION,
          exception);
    }
  }
View Full Code Here

TOP

Related Classes of com.google.clearsilver.jsilver.exceptions.JSilverBadSyntaxException

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.