Examples of PageException


Examples of railo.runtime.exp.PageException

  public static boolean isStatusOK(int statusCode) {
    return statusCode>=200 && statusCode<=299;
  }

  private PageException toPageException(Throwable t) {
    PageException pe = Caster.toPageException(t);
    if(pe instanceof NativeException) {
      ((NativeException) pe).setAdditional(KeyConstants._url, url);
    }
    return pe;
  }
View Full Code Here

Examples of railo.runtime.exp.PageException

      if(!StringUtil.isEmpty(msg, true)) {
        String detail=Caster.toString(sct.get(KeyConstants._detail,null),null);
        String errCode=Caster.toString(sct.get("ErrorCode",null),null);
        String extInfo=Caster.toString(sct.get("ExtendedInfo",null),null);
       
        PageException pe=null;
        if("application".equalsIgnoreCase(type))
          pe = new ApplicationException(msg, detail);
        else if("expression".equalsIgnoreCase(type))
          pe = new ExpressionException(msg, detail);
        else
          pe=new CustomTypeException(msg, detail, errCode, type, extInfo);
       
        // Extended Info
        if(!StringUtil.isEmpty(extInfo,true))pe.setExtendedInfo(extInfo);
 
        // Error Code
        if(!StringUtil.isEmpty(errCode,true))pe.setErrorCode(errCode);
       
        // Additional
        if(pe instanceof PageExceptionImpl) {
          PageExceptionImpl pei=(PageExceptionImpl) pe;
          sct=Caster.toStruct(sct.get("additional",null),null);
View Full Code Here

Examples of railo.runtime.exp.PageException

    throw new CustomTypeException( "",detail,errorcode,type,extendedinfo,level);
  }

  private void _doStartTag(Object obj) throws PageException {
    if(!StringUtil.isEmpty(obj)){
      PageException pe = toPageException(obj,null);
      if(pe!=null) throw pe;
     
      CustomTypeException exception = new CustomTypeException(Caster.toString(obj),detail,errorcode,type,extendedinfo,level);
      throw exception;
    }
View Full Code Here

Examples of railo.runtime.exp.PageException

        Class<?> clazz = mapping.touchPCLCollection().loadClass(getClazz(), barr,isComponent());
        try{
          return  newInstance(clazz);
        }
        catch(Throwable t){
          PageException pe = Caster.toPageException(t);
          pe.setExtendedInfo("failed to load template "+getDisplayPath());
          throw pe;
        }
    }
View Full Code Here

Examples of railo.runtime.exp.PageException

    tries++;
    try {
      execute(config);
    }
    catch(Throwable t) {
      PageException pe = Caster.toPageException(t);
      String st = ExceptionUtil.getStacktrace(t,true);
      //config.getErrWriter().write(st+"\n");
     
      Struct sct=new StructImpl();
      sct.setEL("message", pe.getMessage());
      sct.setEL("detail", pe.getDetail());
      sct.setEL("stacktrace", st);
      sct.setEL("time", Caster.toLong(System.currentTimeMillis()));
      exceptions.appendEL(sct);
     
      throw pe;
View Full Code Here

Examples of railo.runtime.exp.PageException

     
     
     
      try {
      if(cfc.contains(pageContext, ON_ERROR)){
            PageException pe = Caster.toPageException(t);
            //Object rtn=cfc.call(pageContext, ON_ERROR, new Object[]{pe.getCatchBlock(pageContext),source});
         
            Struct args=new StructImpl(StructImpl.TYPE_LINKED);
            args.set(CFCATCH, pe.getCatchBlock(ThreadLocalPageContext.getConfig(pageContext)));
            args.set(SOURCE, source);
            Object rtn=cfc.callWithNamedValues(pageContext, ON_ERROR, args)
       
            if(Caster.toBooleanValue(rtn,false))
          throw t;
View Full Code Here

Examples of railo.runtime.exp.PageException

                exeTime=System.nanoTime();

                currentPage.call(this);
      }
      catch(Throwable t){
        PageException pe = Caster.toPageException(t);
        if(Abort.isAbort(pe)) {
                    if(Abort.isAbort(pe,Abort.SCOPE_REQUEST))throw pe;
                }
                else {
                  if(fdEnabled){
                    FDSignal.signal(pe, false);
                  }
                  pe.addContext(currentPage.getPageSource(),-187,-187, null);// TODO was soll das 187
                  throw pe;
                }
      }
      finally {
        includeOnce.add(currentPage.getPageSource());
        long diff= ((System.nanoTime()-exeTime)-(executionTime-currTime));
          executionTime+=(System.nanoTime()-time);
        debugEntry.updateExeTime(diff);
        removeLastPageSource(true);
     
    }
  // no debug
    else {
      Page currentPage = PageSourceImpl.loadPage(this, sources);
      if(runOnce && includeOnce.contains(currentPage.getPageSource())) return;
        try {
        addPageSource(currentPage.getPageSource(),true);
                currentPage.call(this);
      }
      catch(Throwable t){
        PageException pe = Caster.toPageException(t);
        if(Abort.isAbort(pe)) {
          if(Abort.isAbort(pe,Abort.SCOPE_REQUEST))throw pe;
                }
                else    {
                  pe.addContext(currentPage.getPageSource(),-187,-187, null);
                  throw pe;
                }
      }
      finally {
        includeOnce.add(currentPage.getPageSource());
View Full Code Here

Examples of railo.runtime.exp.PageException

     
     
     
      }
      catch(Throwable t) {
        PageException pe = Caster.toPageException(t);
        if(!Abort.isSilentAbort(pe)){
          log(true);
          if(fdEnabled){
              FDSignal.signal(pe, false);
            }
View Full Code Here

Examples of railo.runtime.exp.PageException

      try {
        listener.onRequest(this,base,null);
        log(false);
      }
      catch(Throwable t) {
        PageException pe = Caster.toPageException(t);
        if(!Abort.isSilentAbort(pe)){
          this.pe=pe;
          log(true);
          if(fdEnabled){
              FDSignal.signal(pe, false);
View Full Code Here

Examples of railo.runtime.exp.PageException

    detail.setEL("template", ct.getTemplate());
    return detail;
  }

  public Object execute(Config config) throws PageException {
    PageException pe = ct.execute(config);
    if(pe!=null) throw pe;
    return null;
  }
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.