Examples of ExecutionException


Examples of java.util.concurrent.ExecutionException

      }

      if (exception == null) {
        return null;
      } else {
        throw new ExecutionException(exception);
      }
    }
  }
View Full Code Here

Examples of java.util.concurrent.ExecutionException

      if (isCompleted) {
        if (exception == null) {
          return null;
        } else {
          throw new ExecutionException(exception);
        }
      } else {
        throw new TimeoutException();
      }
    }
View Full Code Here

Examples of java.util.concurrent.ExecutionException

    T value = null;
    do {
      try {
        value = untilNotNull.call();
      } catch (Exception e) {
        throw new ExecutionException(e);
      }

      if (value != null) {
        return value;
      }
View Full Code Here

Examples of java.util.concurrent.ExecutionException

          }
          return ret;
        } catch (Exception e) {
          throw e;
        } catch (Throwable e) {
          throw new ExecutionException("Error executing memoized function", e);
        }
      }
    });

    if (v == CACHED_NULL) {
View Full Code Here

Examples of java.util.concurrent.ExecutionException

      T value;
      try {
        value = task.get();
      } catch (InterruptedException e) {
        Thread.currentThread().interrupt();
        throw new ExecutionException(e);
      }
      results.add(value);
    }

    return results;
View Full Code Here

Examples of javax.inject.ExecutionException

         }
         context.bind(parts[length - 1], binding);
      }
      catch (NamingException e)
      {
         throw new ExecutionException("Cannot bind " + binding + " to " + key, e);
      }
   }
View Full Code Here

Examples of npanday.executable.ExecutionException

        throws ExecutionException
    {
        File path = new File( compilerContext.getCompilerCapability().getAssemblyPath() );
        if ( !path.exists() )
        {
            throw new ExecutionException(
                "NPANDAY-067-002: The assembly path does not exist: Path = " + path.getAbsolutePath() );
        }

        List<String> commands = netCompiler.getCommands();
        commands.add( "/nostdlib+" );
View Full Code Here

Examples of org.apache.jackrabbit.vault.util.console.ExecutionException

                name = file.getName();
            }
            File local = ctx.getVaultFsApp().getPlatformFile(name, false);
            doGet(file, local, forced);
        } else {
            throw new ExecutionException("'get' only possible in jcr fs context");
        }
    }
View Full Code Here

Examples of org.apache.lenya.cms.task.ExecutionException

            String id = getParameters().getParameter(PARAMETER_DOCUMENT_ID);
            String area = getParameters().getParameter(PARAMETER_DOCUMENT_AREA);
            String language = getParameters().getParameter(PARAMETER_DOCUMENT_LANGUAGE);
            document = getDocument(id, area, language);
        } catch (Exception e) {
            throw new ExecutionException(e);
        }
        return document;
    }
View Full Code Here

Examples of org.apache.ode.tools.ExecutionException

    _bpelFiles.add(u);
  }

  public void execute(CommandContext cc) throws ExecutionException {
    if (_bpelFiles.size() == 0) {
      throw new ExecutionException(__msgs.msgAtLeastOneProcessRequired());
    }

    if (_outputDir == null) {
      _outputDir = new File(SystemUtils.userDirectory());
    }

    _cc = cc;
    CompileListener myListener = new CompileListener() {

      public void onCompilationMessage(CompilationMessage m) {
        if (m.severity >= _minSeverity) {
          _cc.outln(m.toErrorString());
        }
        if (_compileListener != null) {
          _compileListener.onCompilationMessage(m);
        }
      }
    };

    URI u = null;

    if (_wsdlUri != null) {
      try {
        u = new URI(FileUtils.encodePath(_wsdlUri));
      }
      catch (URISyntaxException use) {
        throw new ExecutionException(__msgs.msgInvalidWsdlUrl(_wsdlUri));
      }
    }

    for (String bpelURI : _bpelFiles) {
      BpelC compiler = BpelC.newBpelCompiler();
      if (u != null) {
        compiler.setProcessWSDL(u);
      }
      compiler.setCompileListener(myListener);

      File bpelFile = new File(bpelURI);
      if (!bpelFile.exists()) {
        _cc.debug("File does not exist: " + bpelFile);
        throw new ExecutionException(__msgs.msgInvalidBpelUrl(bpelURI));
      }

      try {
        long start = System.currentTimeMillis();
        compiler.compile(bpelFile);
        long t = System.currentTimeMillis() - start;
        _cc.info("Compilation completed in " + t + "ms");
      }
      catch (IOException ioe) {
        throw new ExecutionException(__msgs.msgIoExReadingStreamWithMsg(bpelFile, ioe.getMessage()));
      } catch (CompilationException e) {
        throw new ExecutionException(e.toErrorMessage(), 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.