Package com.orientechnologies.orient.core.processor

Examples of com.orientechnologies.orient.core.processor.OProcessException


    } else {
      // EXECUTE ENTIRE PROCESS
      try {
        result = iManager.processFromFile(iName, iContext, iReadOnly);
      } catch (Exception e) {
        throw new OProcessException("Error on processing '" + iName + "' field of '" + getName() + "' block", e);
      }
    }

    if ("last".equalsIgnoreCase(returnType))
      returnValue = result;
View Full Code Here


  }

  public Object process(final String iType, final String iName, final Object... iParameters) {
    final OComposableProcessor process = (OComposableProcessor) OProcessorManager.getInstance().get(iType);
    if (process == null)
      throw new OProcessException("Process type '" + iType + "' is undefined");

    final OBasicCommandContext context = new OBasicCommandContext();
    if (iParameters != null) {
      int argIdx = 0;
      for (Object p : iParameters)
        context.setVariable("arg" + (argIdx++), p);
    }

    Object res;

    try {
      res = process.processFromFile(iName, context, false);
    } catch (Exception e) {
      throw new OProcessException("Error on processing '" + iName + "' field of '" + getName() + "' block", e);
    }

    return res;
  }
View Full Code Here

              return m.invoke(null, args);
            } catch (IllegalArgumentException e1) {
              // DO NOTHING, LOOK FOR ANOTHER METHOD
            } catch (Exception e1) {
              OLogManager.instance().error(this, "Error on calling function '%s'", e, function);
              throw new OProcessException("Error on calling function '" + function + "'", e);
            }
          }
        }

        // METHOD NOT FOUND!
        debug(iContext, "Method not found: " + clsName + "." + methodName + "(" + Arrays.toString(args) + ")");

        for (Method m : cls.getMethods()) {
          final StringBuilder candidates = new StringBuilder();
          if (m.getName().equals(methodName)) {
            candidates.append("-" + m + "\n");
          }
          if (candidates.length() > 0)
            debug(iContext, "Candidate methods were: \n" + candidates);
          else
            debug(iContext, "No candidate methods were found");
        }

      } catch (ClassNotFoundException e) {
        throw new OProcessException("Function '" + function + "' was not found because the class '" + clsName + "' was not found");
      } catch (Exception e) {
        OLogManager.instance().error(this, "Error on executing function block", e);
      }
    }

    throw new OProcessException("Function '" + function + "' was not found");
  }
View Full Code Here

TOP

Related Classes of com.orientechnologies.orient.core.processor.OProcessException

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.