Examples of TemplateException


Examples of org.fundacionctic.su4j.endpoint.exceptions.TemplateException

      Velocity.evaluate(ctx, osw, "su4j", new BufferedReader(new InputStreamReader(is, "UTF-8")));
      osw.flush();
      osw.close();
    } catch (Exception e) {
      e.printStackTrace();
      throw new TemplateException(e.getMessage());
    }   
  }
View Full Code Here

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

Examples of org.jostraca.TemplateException

      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

Examples of org.jostraca.TemplateException

    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

Examples of org.jostraca.TemplateException

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

  }
View Full Code Here

Examples of org.jostraca.TemplateException

      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

Examples of org.megatome.frame2.template.TemplateException

      TemplateConfigReader reader = new TemplateConfigReader(this.definitions);
      try {
         reader.execute(is);
      } catch (Exception e) {
         e.printStackTrace();
         throw new TemplateException(
            "Unable to load template definition file", //$NON-NLS-1$
            e);
      }
      for (TemplateDefI def : this.definitions.values()) {
        def.setConfigDir(this.configDir);
View Full Code Here

Examples of org.megatome.frame2.template.TemplateException

   }
   protected void validateDefinitionPath(ServletContext context,TemplateDefI def)
                                                         throws TemplateException {
      InputStream is = context.getResourceAsStream(this.configDir + def.getPath());
      if (is == null) {
         throw new TemplateException(TEMPLATE_PATH_EXCEPTION_MSG +
                                      this.configDir +
                                      def.getPath());
      }
   }
View Full Code Here

Examples of org.megatome.frame2.template.TemplateException

      Map<String, String> puts = def.getPutParams();
      Collection<String> paths = puts.values();
      for (String path : paths) {
         InputStream is = context.getResourceAsStream(this.configDir + path);
         if (is == null) {
            throw new TemplateException(TEMPLATE_PUT_PATH_EXCEPTION_MSG +
                                         this.configDir + path);
         }
      }
   }
View Full Code Here

Examples of org.megatome.frame2.template.TemplateException

                        "Error finding template definition file "); //$NON-NLS-1$
            }
            this.reader.parse(is);
        } catch (ParserException e) {
            e.printStackTrace();
            throw new TemplateException("Unable to load template definition: " //$NON-NLS-1$
                    + e.getMessage(), e);
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.