Example usage for org.apache.commons.codec EncoderException getCause

List of usage examples for org.apache.commons.codec EncoderException getCause

Introduction

In this page you can find the example usage for org.apache.commons.codec EncoderException getCause.

Prototype

public synchronized Throwable getCause() 

Source Link

Document

Returns the cause of this throwable or null if the cause is nonexistent or unknown.

Usage

From source file:eu.seaclouds.platform.planner.core.utils.HttpHelper.java

private String prepareRequestURL(String restPath, List<NameValuePair> params) {
    StringBuilder operationBuilder = new StringBuilder();
    operationBuilder.append(serviceURL);
    operationBuilder.append(restPath);//from   w  w w .j a  v a2  s.  co m
    if (params.size() > 0) {
        operationBuilder.append("?");
        URLCodec coded = new URLCodec();
        try {
            for (NameValuePair p : params)
                operationBuilder.append(p.getName() + "=" + coded.encode(p.getValue()));

        } catch (EncoderException e) {
            log.error(e.getCause().getMessage(), e);
            return "";
        }
    }
    return operationBuilder.toString();
}