Package org.apache.cactus.util

Examples of org.apache.cactus.util.ChainedRuntimeException


            // If we get back a response code of 302, it means we were
            // redirected to the context root after successfully logging in.
            // If we receive anything else, we didn't log in correctly.
            if (connection.getResponseCode() != 302)
            {
                throw new ChainedRuntimeException("Unable to login, "
                    + "probably due to bad username/password. Received a ["
                    + connection.getResponseCode() + "] response code and "
                    + "was expecting a [302]");
            }
        }
        catch (Throwable e)
        {
            throw new ChainedRuntimeException("Failed to authenticate "
                + "the principal", e);
        }
    }
View Full Code Here


            result = callGetResult(theRequest);
        }
        catch (ParsingException e)
        {
            String url = this.configuration.getRedirectorURL(theRequest);
            throw new ChainedRuntimeException("Failed to get the test "
                + "results at [" + url + "]", e);
        }

        // Check if the returned result object returned contains an error or
        // not. If yes, we need to raise an exception so that the JUnit
View Full Code Here

            reason += "\t- The server is not running,\r\n";
            reason += ("\t- The server redirector is not correctly mapped in "
                + "web.xml,\r\n");
            reason += "\t- Something else ... !";

            throw new ChainedRuntimeException(reason);
        }

        return out;
    }
View Full Code Here

            connectionHelper = (ConnectionHelper) constructor.newInstance(
                new Object[] {theUrl});
        }
        catch (Exception e)
        {
            throw new ChainedRuntimeException("Failed to load the ["
                + theConfiguration.getConnectionHelper()
                + "] ConnectionHelper " + "class", e);
        }

        return connectionHelper;
View Full Code Here

            {
                value = URLDecoder.decode(value);
            }
            catch (Exception e)
            {
                throw new ChainedRuntimeException("Error URL decoding ["
                    + value + "]", e);
            }
        }

        return value;
View Full Code Here

            {
                this.content = IoUtil.getText(this.connection.getInputStream());
            }
            catch (IOException e)
            {
                throw new ChainedRuntimeException(e);
            }
        }

        return this.content;
    }
View Full Code Here

            input.close();
        }
        catch (IOException e)
        {
            throw new ChainedRuntimeException(e);
        }

        // Dummy variable to explicitely tell the object type to copy.
        String[] dummy = new String[lines.size()];
View Full Code Here

        {
            return this.connection.getInputStream();
        }
        catch (IOException e)
        {
            throw new ChainedRuntimeException(e);
        }
    }
View Full Code Here

                            getConnection().getURL().getFile()),
                        false, new Header(headerName, headerValue));
                }
                catch (HttpException e)
                {
                    throw new ChainedRuntimeException(
                        "Error parsing cookies", e);
                }

                // Transform the HttpClient cookies into Cactus cookies and
                // add them to the cookieVector vector
View Full Code Here

        {
            return this.connection.getResponseCode();
        }
        catch (IOException e)
        {
            throw new ChainedRuntimeException(e);
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.cactus.util.ChainedRuntimeException

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.