Package org.fto.jthink.exception

Examples of org.fto.jthink.exception.JThinkRuntimeException


  public static  synchronized void save(Element el, String fileName, String encoding){
    try {
      toXmlFile(el, encoding, fileName);
    }
    catch (Exception e) {
      throw new JThinkRuntimeException(JThinkErrorCode.ERRCODE_XML_XML_FILE_SAVE_FAILED,  "Save xml error!", e);
    }
  }
View Full Code Here


  public static  synchronized void save(org.jdom.Document doc, String fileName, String encoding){
    try {
      toXmlFile(doc, encoding, fileName);
    }
    catch (Exception e) {
      throw new JThinkRuntimeException(JThinkErrorCode.ERRCODE_XML_XML_FILE_SAVE_FAILED,  "Save xml error!", e);
    }
  }
View Full Code Here

    }
    try {
      return toXmlString(el, encoding);
    }
    catch (IOException e) {
      throw new JThinkRuntimeException(JThinkErrorCode.ERRCODE_XML_XML_STRING_SAVE_FAILED, "to xml string error!", e);
    }
  }
View Full Code Here

    }
    try {
        return toXmlString(el, encoding);

    }catch (IOException e) {
      throw new JThinkRuntimeException(JThinkErrorCode.ERRCODE_XML_XML_STRING_SAVE_FAILED, "to xml string error!", e);
    }
  }
View Full Code Here

                                       String value) {
    if (value != null) {
      if(element.getAttributeValue(name)==null){
        element.setAttribute(new Attribute(name, value));
      }else{
        throw new JThinkRuntimeException("Attribute already exist! attribute name is " + name);
      }
    }
  }
View Full Code Here

    }
    try{
      conns.add(new PooledConnection(conn));
      return true;
    }catch(SQLException e){
      throw new JThinkRuntimeException(e);
    }
  }
View Full Code Here

  /**
   * 返回fto-jthink.xml配置
   */
  public synchronized static Configuration getConfiguration(){
    if(cfg==null){
      throw new JThinkRuntimeException("还没有正确配置,fto-jthink.xml文件没有找到!");
    }
    return cfg;
  }
View Full Code Here

      if(maxId.get("MAXID")==null){
        return new Integer(1);
      }
      return new Integer(Integer.parseInt((String)maxId.get("MAXID"))+1);
    }
    throw new JThinkRuntimeException("not find!");
  }
View Full Code Here

    }else if(priorityStr.equalsIgnoreCase(Priority.FATAL.getLevelString())){
      //cfgPriority = Priority.FATAL;
      level = Priority.FATAL.getLevel();
     
    }else{
      throw new JThinkRuntimeException("错误的日志优先级定义(priority)定义!");
    }
  }
View Full Code Here

      try{
        if(connection.getMetaData().supportsTransactionIsolationLevel(level)){
          connection.setTransactionIsolation(level);
        }
      }catch(SQLException e){
        throw new JThinkRuntimeException(e);
      }
    }
View Full Code Here

TOP

Related Classes of org.fto.jthink.exception.JThinkRuntimeException

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.