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

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

Introduction

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

Prototype

public synchronized Throwable initCause(Throwable cause) 

Source Link

Document

Initializes the cause of this throwable to the specified value.

Usage

From source file:com.fatwire.dta.sscrawler.util.SSUriHelper.java

protected String encode(String value) throws EncoderException {
    try {//w ww . java 2 s  . c  o m
        return urlCodec.encode(value, getCharSet());
    } catch (UnsupportedEncodingException e) {
        EncoderException t = new EncoderException(e.getMessage());
        t.initCause(e);
        throw t;
    }

}