Package railo.runtime.exp

Examples of railo.runtime.exp.PageException


    if(StringUtil.isEmpty(msg,true)) msg=t.getClass().getName();
   
    StringBuilder sb=new StringBuilder(msg);
   
    if(t instanceof PageException){
      PageException pe=(PageException)t;
      String detail = pe.getDetail();
      if(!StringUtil.isEmpty(detail,true)) {
        sb.append('\n');
        sb.append(detail);
      }
    }
View Full Code Here


    }
     
  }

  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

  private static Method setAdditional;


  public static PageException createException(SessionFactoryData data, Component cfc, String msg, String detail) {
   
    PageException pe = createException((ORMSession)null,cfc,msg,detail);
    if(data!=null)setAddional(pe,data);
    return pe;
  }
View Full Code Here

    PageException pe = createException((ORMSession)null,cfc,msg,detail);
    if(data!=null)setAddional(pe,data);
    return pe;
  }
  public static PageException createException(SessionFactoryData data, Component cfc, Throwable t) {
    PageException pe = createException((ORMSession)null,cfc,t);
    if(data!=null)setAddional(pe,data);
    return pe;
  }
View Full Code Here

    return pe;
  }

 
  public static PageException createException(ORMSession session,Component cfc,Throwable t) {
    PageException pe = CFMLEngineFactory.getInstance().getExceptionUtil().createApplicationException(t.getMessage());
    pe.setStackTrace(t.getStackTrace());
    if(session!=null)setAddional(session,pe);
    if(cfc!=null)setContext(pe,cfc);
    return pe;
  }
View Full Code Here

    return pe;
  }
 

  public static PageException createException(ORMSession session,Component cfc,String message,String detail) {
    PageException pe = CFMLEngineFactory.getInstance().getExceptionUtil().createApplicationException(message);
    if(session!=null)setAddional(session,pe);
    if(cfc!=null)setContext(pe,cfc);
    return pe;
  }
View Full Code Here

  public void flush(PageContext pc) throws PageException {
    try {
      session().flush();
    }
    catch(ConstraintViolationException cve){
      PageException pe = ExceptionUtil.createException(this,null,cve);
      if(!Util.isEmpty(cve.getConstraintName())) {
        ExceptionUtil.setAdditional(pe, CommonUtil.createKey("constraint name"), cve.getConstraintName());
      }
      throw pe;
    }
View Full Code Here

  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

      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

    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

TOP

Related Classes of railo.runtime.exp.PageException

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.