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

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

Introduction

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

Prototype

public String toString() 

Source Link

Document

Returns a short description of this throwable.

Usage

From source file:phex.utils.URLCodecUtils.java

/**
 * @throws RuntimeException Thrown if URL encoding is unsuccessful.
 *       This only happens in the case of a UnsupportedEncodingException
 *       which should never occur in reality.
 *///  ww  w. java 2  s. c  om
public static String encodeURL(String url) {
    try {
        return urlCodec.encode(url);
    } catch (EncoderException exp) {
        //            NLogger.error( URLCodecUtils.class, exp, exp );
        throw new RuntimeException(exp.toString() + ": " + exp.getMessage());
    }
}