Package com.hlcl.rql.as

Examples of com.hlcl.rql.as.RQLException


      BufferedWriter writer2 = getWriter();
      writer2.newLine();
      writer2.flush();
      firstField = true;
    } catch (IOException ex) {
      throw new RQLException("IOException writing the line separator into file " + filename + ".", ex);
    }
  }
View Full Code Here


        replace = StringHelper.replace(replace, separator, " ");
        replace = StringHelper.replace(replace, "\n", " ");
      }
      writer.append(replace);
    } catch (IOException ex) {
      throw new RQLException("IOException appending the given value " + columnValue + " into file " + filename + ".", ex);
    }
  }
View Full Code Here

   */
  public void close() throws RQLException {
    try {
      writer.close();
    } catch (IOException ex) {
      throw new RQLException("IOException closing the file " + filename + ".", ex);
    }
  }
View Full Code Here

    if (writer == null) {
      try {
        writer = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(filename), encoding));
        firstField = true;
      } catch (UnsupportedEncodingException ex) {
        throw new RQLException("Unsupported encoding " + encoding + ". See JavaDoc and try again.", ex);
      } catch (FileNotFoundException ex) {
        throw new RQLException("File not found exception for filename " + filename + ".", ex);
      }
    }
    return writer;
  }
View Full Code Here

        Class<?>[] parms = new Class[1];
        parms[0] = parameterValue.getClass();
        this.method = adaptee.getClass().getMethod(methodName, parms);
      }
    } catch (SecurityException ex) {
      throw new RQLException("Security exception getting method with name " + methodName + " for parameter value " + parameterValue
          + " on page " + adaptee.getInfoText(), ex);
    } catch (NoSuchMethodException ex) {
      throw new RQLException("Missing method with name " + methodName + " for parameter value " + parameterValue + " on page "
          + adaptee.getInfoText(), ex);
    }

    // check method's return type: fix string
    if (!method.getReturnType().equals("".getClass())) {
      throw new RQLException("Adapter misconfiguration exception: method with name " + methodName + " for parameter value " + parameterValue
          + " doesn't return a string object");
    }
  }
View Full Code Here

      } else {
        // one string parameter value
        result = (String) method.invoke(adaptee, parameterValue);
      }
    } catch (IllegalArgumentException ex) {
      throw new RQLException("Illegal argument exception invoking method with name " + method.getName() + " for parameter value "
          + parameterValue + " on page " + adaptee.getInfoText(), ex);
    } catch (IllegalAccessException ex) {
      throw new RQLException("Illegal access exception invoking method with name " + method.getName() + " for parameter value "
          + parameterValue + " on page " + adaptee.getInfoText(), ex);
    } catch (InvocationTargetException ex) {
      throw new RQLException("Invocation target exception invoking method with name " + method.getName() + " for parameter value "
          + parameterValue + " on page " + adaptee.getInfoText(), ex);
    }
    return result;
  }
View Full Code Here

   */
  public void saveAsPngTo(String path) throws RQLException {
    try {
      ImageIO.write(image, "PNG", new File(path));
    } catch (IOException ioe) {
      throw new RQLException("Image could not be saved as PNG to "+path+".", ioe);
    }
  }
View Full Code Here

TOP

Related Classes of com.hlcl.rql.as.RQLException

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.