Package com.orientechnologies.orient.core.command.script

Examples of com.orientechnologies.orient.core.command.script.OCommandScriptException


    this.started = doc.field(PROP_STARTED) == null ? false : ((Boolean) doc.field(PROP_STARTED));
    ODocument funcDoc = doc.field(PROP_FUNC);
    if (funcDoc != null)
      function = new OFunction(funcDoc);
    else
      throw new OCommandScriptException("function cannot be null");
    this.startTime = doc.field(PROP_STARTTIME);
    this.document = doc;
    this.db = ODatabaseRecordThreadLocal.INSTANCE.get();
  }
View Full Code Here


    this.started = doc.field(PROP_STARTED) == null ? false : ((Boolean) doc.field(PROP_STARTED));
    ODocument funcDoc = doc.field(PROP_FUNC);
    if (funcDoc != null)
      function = new OFunction(funcDoc);
    else
      throw new OCommandScriptException("function cannot be null");
    this.startTime = doc.field(PROP_STARTTIME);
    this.db = ODatabaseRecordThreadLocal.INSTANCE.get();
  }
View Full Code Here

            args[i++] = arg.getValue();
        }
        invocableEngine.invokeFunction(this.function.getName(), args);
      }
    } catch (ScriptException e) {
      throw new OCommandScriptException("Error on execution of the script", this.function.getName(), e.getColumnNumber(), e);
    } catch (NoSuchMethodException e) {
      throw new OCommandScriptException("Error on execution of the script", this.function.getName(), 0, e);
    } catch (OCommandScriptException e) {
      throw e;
    } catch (Exception ex) {
      throw new OCommandScriptException("Unknown Exception", this.function.getName(), 0, ex);
    } finally {
      if (scriptManager != null && binding != null)
        scriptManager.unbind(binding);
      OLogManager.instance().warn(this, "Job : " + this.toString() + " Finished!");
      isRunning = false;
View Full Code Here

        final Invocable invocableEngine = (Invocable) scriptEngine;
        Object[] EMPTY = new Object[0];
        result = (String) invocableEngine.invokeFunction(func.getName(), EMPTY);
      }
    } catch (ScriptException e) {
      throw new OCommandScriptException("Error on execution of the script", func.getName(), e.getColumnNumber(), e);
    } catch (NoSuchMethodException e) {
      throw new OCommandScriptException("Error on execution of the script", func.getName(), 0, e);
    } catch (OCommandScriptException e) {
      // PASS THROUGH
      throw e;

    } finally {
View Full Code Here

    return false;
  }

  @Override
  protected void throwSyntaxErrorException(String iText) {
    throw new OCommandScriptException("Error on parsing of the script: " + iText);
  }
View Full Code Here

TOP

Related Classes of com.orientechnologies.orient.core.command.script.OCommandScriptException

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.