Package org.jostraca

Examples of org.jostraca.TemplateException


      if( ! version.startsWith( VERSION_NUMBER ) ) {
        if( version.startsWith( "0." ) ) {
          // attempt version in same major version
        }
        else {
          throw new TemplateException( TemplateException.CODE_bad_version,
                                       new String[] { "template_version", version, "expected_version", VERSION_NUMBER } );
        }
      }
    }
  }
View Full Code Here


      pTemplate.addFileBuildResource( includeFilePath );
     
      return includeContent;
    }
    catch( Exception e ) {
      throw new TemplateException( TemplateException.CODE_include,
          new String[] { ValueCode.FILE, includeFilePath, ValueCode.TEMPLATE, pPath }, e );
    }

  }
View Full Code Here

    if( null == count ) {
      count = new Integer(0);
      includeFileMap.put(path, count);
    }
    if( MAX_INCLUDE_COUNT < count.intValue() ) {
      throw new TemplateException( TemplateException.CODE_infinite_recursion, path+" included "+count.intValue()+" times, max allowed: "+MAX_INCLUDE_COUNT );     
    }
   
    String incsrc = loadIncludeSource(path, args, pTemplate);
   
    return incsrc;
View Full Code Here

    try {
      sIncludeArgsRegExp = RegExp.make( REGEXP_IncludeArgs, RegExp.ModeSet.DotMatchesNewline );
    }
    catch( Exception e ) {
      throw new TemplateException( TemplateException.CODE_re_include, e );
    }

  }
View Full Code Here

      String includeBlockContent = markRegExp.match( includeFileContent );

      return includeBlockContent;
    }
    catch( Exception e ) {
      throw new TemplateException( TemplateException.CODE_includeblock,
          new String[] { ValueCode.FILE, includeFilePath, ValueCode.TEMPLATE, pPath }, e );
    }

  }
View Full Code Here

TOP

Related Classes of org.jostraca.TemplateException

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.