Tabnine Logo
HttpDownload.getThrowable
Code IndexAdd Tabnine to your IDE (free)

How to use
getThrowable
method
in
ca.nrc.cadc.net.HttpDownload

Best Java code snippets using ca.nrc.cadc.net.HttpDownload.getThrowable (Showing top 20 results out of 315)

origin: org.opencadc/cadc-cdp

if ( get.getThrowable() != null)
  if (get.getThrowable() instanceof IOException)
    throw (IOException) get.getThrowable();
  if (get.getThrowable() instanceof AccessControlException)
    throw (AccessControlException) get.getThrowable();
  if (get.getThrowable() instanceof FileNotFoundException)
    throw new ResourceNotFoundException(get.getThrowable().getMessage(), get.getThrowable());
  throw new RuntimeException("unexpected failure download certificate", get.getThrowable());
origin: org.opencadc/cadc-uws-server

public ExecutionPhase getPhase(String jobID)
  throws JobNotFoundException, JobPersistenceException
{
  try
  {
    URL u = new URL(baseURL.toExternalForm() + "/" + jobID);
    ByteArrayOutputStream out = new ByteArrayOutputStream();
    HttpDownload get = new HttpDownload(u, out);
    get.setUserAgent(this.getClass().getName());
    get.run();
    if (get.getThrowable() != null)
    {
      if (get.getThrowable().getMessage().contains("not found"))
        throw new JobNotFoundException("not found: " + jobID);
      throw new JobPersistenceException("failed to get " + jobID, get.getThrowable());
    }
    String phase = out.toString().trim();
    log.debug("phase: " + phase);
    ExecutionPhase ret = ExecutionPhase.toValue(phase);
    return ret;
  }
  catch(MalformedURLException bug)
  {
    throw new RuntimeException("BUG - failed to create valid URL", bug);
  }
}
origin: org.opencadc/cadc-vosi

if (get.getThrowable() != null)
  log.debug("FAIL", get.getThrowable());
  throw new CheckException(name + " " + url.toExternalForm() + " test failed: " + get.getThrowable());
origin: org.opencadc/cadc-vos

if (get.getThrowable() != null)
  throw new RuntimeException("Unable to get job because " + get.getThrowable().getLocalizedMessage());
origin: org.opencadc/cadc-vos

VOSClientUtil.checkFailure(get.getThrowable());
origin: org.opencadc/cadc-vos

if (get.getThrowable() != null)
  throw new RuntimeException("Unable to get Job because " + get.getThrowable().getLocalizedMessage());
origin: org.opencadc/cadc-test-uws

ret.throwable = doit.getThrowable();
ret.responseCode = doit.getResponseCode();
ret.contentType = doit.getContentType();
origin: org.opencadc/cadc-access-control

if (download.getThrowable() != null)
      .getThrowable());
origin: org.opencadc/cadc-download-manager

HttpDownload get = new HttpDownload(url, bos);
get.run();
if (get.getThrowable() != null) {
  return new FailIterator(uri, "failed to resolve URI: " + get.getThrowable().getMessage());
origin: org.opencadc/cadc-access-control

if (get.getThrowable() != null)
  log.debug("error calling get user", get.getThrowable());
  message = get.getThrowable().getMessage();
origin: org.opencadc/cadc-access-control

if (get.getThrowable() != null)
  log.debug("error calling get user", get.getThrowable());
  message = get.getThrowable().getMessage();
origin: org.opencadc/cadc-download-manager

get.run();
Throwable t1 = get.getThrowable(); // report this fail if password fails
if (get.getThrowable() != null) {
  if (get.getResponseCode() == 401 // no cookie or cookie invalid
    || get.getResponseCode() == 403) { // no cookie and private node
    get = new HttpDownload(url, bos);
    get.run();
    if (get.getThrowable() == null) {
origin: org.opencadc/cadc-test-uws

  get.run();
if (get.getThrowable() != null) {
  Assert.fail("failed to check phase for " + jobURL + " reason: " + get.getThrowable());
origin: org.opencadc/cadc-vos

  if (download.getThrowable() == null)
throw new IOException("failed to download file", firstDownload.getThrowable());
origin: org.opencadc/cadc-vos

if (get.getThrowable() != null)
  log.debug("Unable to run the job", get.getThrowable());
  throw new RuntimeException("Unable to run the job because " + get.getThrowable().getMessage());
origin: org.opencadc/cadc-access-control

transfer.run();
Throwable error = transfer.getThrowable();
if (error != null)
origin: org.opencadc/cadc-access-control

httpDownload.run();
final Throwable error = httpDownload.getThrowable();
origin: org.opencadc/cadc-access-control

transfer.run();
Throwable error = transfer.getThrowable();
if (error != null)
origin: org.opencadc/cadc-access-control

httpDownload.run();
final Throwable error = httpDownload.getThrowable();
origin: org.opencadc/cadc-access-control

transfer.run();
Throwable error = transfer.getThrowable();
if (error != null)
ca.nrc.cadc.netHttpDownloadgetThrowable

Popular methods of HttpDownload

  • <init>
    Constructor with default user-agent string.
  • run
    Run the download. This method is intended to be run via a Thread (or pool) but can be called directl
  • getContentType
    Get the content-type returned by the server.
  • getResponseCode
  • getContentLength
    Get the size of the download (the Content-Length).
  • setMaxRetries
  • setOverwrite
    Enable forced overwrite of existing destiantion file.
  • setTransferListener
  • setUserAgent
  • askOverwrite
  • checkStatusCode
  • checkTransient
  • checkStatusCode,
  • checkTransient,
  • doCheckDestination,
  • doDecompress,
  • doGet,
  • findEventID,
  • fireEvent,
  • getContentEncoding,
  • getFile

Popular in Java

  • Updating database using SQL prepared statement
  • findViewById (Activity)
  • onCreateOptionsMenu (Activity)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • BufferedImage (java.awt.image)
    The BufferedImage subclass describes an java.awt.Image with an accessible buffer of image data. All
  • EOFException (java.io)
    Thrown when a program encounters the end of a file or stream during an input operation.
  • ConnectException (java.net)
    A ConnectException is thrown if a connection cannot be established to a remote host on a specific po
  • Iterator (java.util)
    An iterator over a sequence of objects, such as a collection.If a collection has been changed since
  • LinkedList (java.util)
    Doubly-linked list implementation of the List and Dequeinterfaces. Implements all optional list oper
  • JFrame (javax.swing)
  • Top Sublime Text plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now