Package center.task

Examples of center.task.CalculateException


        return null;
      if (Type.ZIP.equals(tp))
        return zip(v);
      return unzip(v);
    } catch(IOException e) {
      throw new CalculateException(owner, e)
    } finally {
      tl.addPointTime(TimeList.Type.END);
    }
  }
View Full Code Here


        }
        return result;
      }
      return null;
    } catch (IllegalArgumentException e) {
      throw new CalculateException(owner, e);
    } catch (IllegalAccessException e) {
      throw new CalculateException(owner, e);
    } catch (InvocationTargetException e) {
      throw new CalculateException(owner, e);
    } catch (SysException e) {
      throw new CalculateException(owner, e);
    } finally {
      tl.addPointTime(TimeList.Type.END);
    }
  }
View Full Code Here

              os = new FileOutputStream(f.getCanonicalPath());
              int ch = 0;
              while((ch = is.read()) > 0)
                os.write(ch);
            } catch (IOException e) {
              throw new CalculateException(owner, e);
            } finally {
              if (os != null)
                os.close();
              is.close();
            }
          } else if (o instanceof StringBuffer || o instanceof String) {
            String sb = o.toString();
            FileOutputStream os = null;
            try {
              os = new FileOutputStream(f.getCanonicalPath());
              os.write(sb.getBytes(encode));
            } catch (IOException e) {
              throw new CalculateException(owner, e);
            } finally {
              if (os != null)
                os.close();
            }
          }
        }
      }
      return f;
    } catch (IOException e) {
      throw new CalculateException(owner, e);
    } finally {
      tl.addPointTime(Type.END);
    }
  }
View Full Code Here

      else
        result = null;
    else
      result = cntx.getPrmByFullName(fullname);
    if (isExcept)
      throw new CalculateException(Strings.getString(result));
    return result;
  }
View Full Code Here

      else
        result = null;
    else
      result = cntx.getPrmByFullName(fullname, timeout);
    if (isExcept)
      throw new CalculateException(Strings.getString(result));
    return result;
  }
View Full Code Here

      else
        result = null;
    else
      result = cntx.getPrmAsync(pool, fullname, lst);
    if (isExcept)
      throw new CalculateException(Strings.getString(result));
    return result;
  }
View Full Code Here

      else
        result = null;
    else
      result = Strings.getString(cntx.getPrmByFullName(fullname));
    if (isExcept)
      throw new CalculateException(result);
    return result;
  }
View Full Code Here

      else
        result = null;
    else
      result = Strings.getString(cntx.getPrmByFullName(fullname, timeout));
    if (isExcept)
      throw new CalculateException(result);
    return result;
  }
View Full Code Here

              Object o = n.getValue();
              if (o instanceof WValue)
                try {
                  st.setParam(stm, k, ((WValue)o).getValueWait());
                } catch (Throwable e) {
                  throw new CalculateException(getOwner(), e);
                }
              else
                st.setParam(stm, k, o);
            }
            tl.addPointTime(TimeList.Type.END_WAIT);
            Record result = new Record();
            stm.execute();
            con.commit();
            StringList slist = st.getOutParamNames();
            for(int i = 0; i < slist.size(); i++) {
              String name = slist.get(i);
              Object value = st.getParam(stm, name);
              result.setObject(name, value);
            }
            return result;
          } catch (SQLException e) {
            e.printStackTrace();
            attempt--;
            if (attempt > 0) {
              con = Manager.reInitConnection(con);
            } else
              throw new CalculateException(owner, e);
          } catch (CalculateException ex) {
            throw ex;
          } catch (Exception ex) {
            throw new CalculateException(owner, ex);
          } finally {
            st.closeStatement(stm);
          }
      } finally {
        Manager.freeConnection(con);
      }
    } catch(SysException ex) {
      throw new CalculateException(owner, ex);
    } finally {
      tl.addPointTime(Type.END);
    }
  }
View Full Code Here

              v = System.getenv(pi.name);
            tl.addPointTime(Type.END_WAIT);
            if (v != null)
              sb.append(v);
          } catch (SysException e) {
            throw new CalculateException(owner, e);
          }
        }
      }
      return sb;
    } finally {
View Full Code Here

TOP

Related Classes of center.task.CalculateException

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.