Package com.canoo.webtest.engine

Examples of com.canoo.webtest.engine.StepExecutionException


        if (is != null) {
            try {
                is.close();
            } catch (IOException e) {
                LOG.error(e.getMessage(), e);
                throw new StepExecutionException("Error closing stream: " + e.getMessage(), step);
            }
        }
    }
View Full Code Here


        if (os != null) {
            try {
                os.close();
            } catch (IOException e) {
                LOG.error(e.getMessage(), e);
                throw new StepExecutionException("Error closing stream: " + e.getMessage(), step);
            }
        }
    }
View Full Code Here

    public static Object tryReadObject(final ObjectInputStream ois, final Step step) throws IOException {
        try {
            return ois.readObject();
        } catch (ClassNotFoundException e) {
            LOG.error(e.getMessage(), e);
            throw new StepExecutionException("Error reading object from file: " + e.getMessage(), step);
        }
    }
View Full Code Here

    public static byte[] tryGetBytes(final Context context, final Step step) {
        try {
            return IOUtils.toByteArray(context.getCurrentResponse().getWebResponse().getContentAsStream());
        } catch (IOException e) {
            throw new StepExecutionException("Error processing content: " + e.getMessage(), step);
        }
    }
View Full Code Here

      throw new StepFailedException("Server took to long to answer: "
          + ste.getMessage(), ste);
    }
    else if (e instanceof SAXException)
    {
      throw new StepExecutionException("Response is not well-formed: "
          + e.getMessage(), e);
    }
    else if (e instanceof XNIException)
    { // XNIException are not helpful, we need to extract the deeply
      // nested original exception
      final Throwable originalException = StepUtil.extractNestedException(e);
      throw new StepExecutionException("XNIException caused by "
          + originalException.getMessage(), originalException);
    }
    // TODO: See WT-194 should we catch java.io.IOException here and rethrow
    // as
    // StepFailed with message 'Server closed connection'? This would allow
    // retry around this situation

    throw new StepExecutionException("Unexpected exception caught: "
        + e.getClass().getName(), e);
  }
View Full Code Here

    public static CommandlineJava tryClone(final CommandlineJava fCommandline, final Step step) {
        try {
            return (CommandlineJava) fCommandline.clone();
        } catch (CloneNotSupportedException e) {
            throw new StepExecutionException(e.getMessage(), step);
        }
    }
View Full Code Here

        try {
            return execute.execute();
        } catch (IOException e) {
            final String message = "Execute fork failed: ";
            LOG.error(message, e);
            throw new StepExecutionException(message + e.getMessage(), step);
        }
    }
View Full Code Here

        try {
            return AppletRunnerStep.getUrlForClass(aClassName);
        } catch (MalformedURLException e) {
            final String msg = e.getMessage() + " for class " + aClassName;
            LOG.error(msg, e);
            throw new StepExecutionException(msg, step);
        }
    }
View Full Code Here

      try
      {
        return step.getContext().getXPathHelper().selectFirst(currentResp, xpathStr);
      }
      catch (final XPathException e) {
        throw new StepExecutionException("Error processing xpath \"" + xpathStr + "\".", step, e);
      }
    }
View Full Code Here

    notifySuccess();
  }

  private void checkContextDefined() {
    if (WebtestTask.getThreadContext() == null) {
      throw new StepExecutionException("Step not inside a webtest", this);
    }
  }
View Full Code Here

TOP

Related Classes of com.canoo.webtest.engine.StepExecutionException

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.