Examples of ExecuteException


Examples of org.jboss.byteman.rule.exception.ExecuteException

                    } else {
                        long wait_time=target_time - System.currentTimeMillis();
                        if(wait_time > 0) {
                            this.wait(wait_time);
                        } else {
                            throw new ExecuteException("timeout occurred in joinWait");
                        }
                    }
                } catch (InterruptedException e) {
                    // do nothing
                }
            }
        }

        // since we are the parent and the waiting is over we don't need to stay synchronized
        for (int i = 0; i < max;) {
            Thread child = children.get(i);
            try {
                if (millis <= 0) {
                    child.join();
                } else {
                    long wait_time=target_time - System.currentTimeMillis();
                    if(wait_time > 0) {
                        child.join(wait_time);
                    } else {
                        throw new ExecuteException("timeout occurred in joinWait");
                    }
                }
            } catch (InterruptedException e) {
                // try again
                break;
View Full Code Here

Examples of org.jboss.byteman.rule.exception.ExecuteException

                    } else {
                        long wait_time=target_time - System.currentTimeMillis();
                        if(wait_time > 0) {
                            this.wait(wait_time);
                        } else {
                            throw new ExecuteException("timeout occurred in rendezvous");
                        }
                    }
                } catch (InterruptedException e) {
                    // do nothing
                }
View Full Code Here

Examples of org.jboss.byteman.rule.exception.ExecuteException

                return new Integer(result);
            }
        } catch (ExecuteException e) {
            throw e;
        } catch (Exception e) {
            throw new ExecuteException("BitExpression.interpret : unexpected exception for operation " + token + getPos() + " in rule " + helper.getName(), e);
        }
    }
View Full Code Here

Examples of org.jboss.byteman.rule.exception.ExecuteException

        Object recipientValue = null;
        try {
            if (recipient != null) {
                recipientValue = recipient.interpret(helper);
                if (recipientValue == null) {
                    throw new ExecuteException("MethodExpression.interpret : null recipient for method " + token.getText() + getPos());
                }
            }
            int argCount = arguments.size();

            Object[] argValues = new Object[argCount];
            for (int i = 0; i < argCount; i++) {
                argValues[i] = arguments.get(i).interpret(helper);
            }

            // we have to enable triggers whenever we call out to a method in case it contians a trigger point
            // TODO - do we do this if the method is a built-in? i.e. if the target is an instance of the helper class
            // TODO - this breaks the user disable option so fix it!
            Rule.enableTriggersInternal();
            return method.invoke(recipientValue, argValues);
        } catch (InvocationTargetException e) {
            Throwable th = e.getCause();
            if (th instanceof ExecuteException) {
                throw (ExecuteException)th;
            } else {
                throw new ExecuteException("MethodExpression.interpret : exception invoking method " + token.getText() + getPos(), th);
            }
        } catch (ExecuteException e) {
            throw e;
        } catch (Exception e) {
            throw new ExecuteException("MethodExpression.interpret : exception invoking method " + token.getText() + getPos(), e);
        } finally {
            // disable triggers again
            Rule.disableTriggersInternal();
        }
    }
View Full Code Here

Examples of org.jboss.byteman.rule.exception.ExecuteException

                return result;
            }
        } catch (ExecuteException e) {
            throw e;
        } catch (Exception e) {
            throw new ExecuteException("ComparisonExpression.interpret : unexpected exception for operation " + token + getPos() + " in rule " + helper.getName(), e);
        }
    }
View Full Code Here

Examples of org.jboss.byteman.rule.exception.ExecuteException

        try {
            return field.get(null);
        } catch (ExecuteException e) {
            throw e;
        } catch (IllegalAccessException e) {
            throw new ExecuteException("StaticExpression.interpret : error accessing field " + ownerTypeName + "." + fieldName + getPos(), e);
        } catch (Exception e) {
            throw new ExecuteException("StaticExpression.interpret : unexpected exception accessing field " + ownerTypeName + "." + fieldName + getPos(), e);
        }
    }
View Full Code Here

Examples of org.jboss.byteman.rule.exception.ExecuteException

            field.set(null, value);
            return value;
        } catch (ExecuteException e) {
            throw e;
        } catch (IllegalAccessException e) {
            throw new ExecuteException("StaticExpression.interpretAssign : error accessing field " + ownerTypeName + "." + fieldName + getPos(), e);
        } catch (IllegalArgumentException e) {
            throw new ExecuteException("StaticExpression.interpretAssign : invalid value assigning field " + ownerTypeName + "." + fieldName + getPos(), e);
        } catch (Exception e) {
            throw new ExecuteException("StaticExpression.interpretAssign : unexpected exception accessing field " + ownerTypeName + "." + fieldName + getPos(), e);
        }
    }
View Full Code Here

Examples of org.opencastproject.execute.api.ExecuteException

      if (response != null) {
        Job job = JobParser.parseJob(response.getEntity().getContent());
        logger.info("Completing execution of command {} using a remote execute service", exec);
        return job;
      } else
        throw new ExecuteException(String.format("Failed to execute the command %s using a remote execute service", exec));

    } catch (MediaPackageException e) {
      throw new ExecuteException("Error serializing the MediaPackage element", e);
    } catch (IllegalStateException e) {
      throw new ExecuteException(e);
    } catch (IOException e) {
      throw new ExecuteException(e);
    } finally {
      closeConnection(response);
    }
  }
View Full Code Here

Examples of org.soybeanMilk.core.ExecuteException

   
    ObjectSource os=new HashMapObjectSource(new DefaultGenericConverter());
    os.set("arg0", "arg0");
    os.set("arg1", "1111");
   
    ExecuteException re=null;
   
    try
    {
      invoke.execute(os);
    }
    catch(ExecuteException e)
    {
      re=e;
    }
   
    Assert.assertNotNull(re);
    Assert.assertTrue( (re.getMessage().startsWith("got null resolver class from")) );
  }
View Full Code Here

Examples of org.soybeanMilk.core.ExecuteException

            {
              objSource.set(pathNodes[i].getNodeValue(), valuePath.getPathNode(i).getNodeValue());
            }
            catch(Exception e)
            {
              throw new ExecuteException(e);
            }
          }
        }
      }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.