All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.vdurmont.fakejedis.FakeJedisNotImplementedException Maven / Gradle / Ivy

The newest version!
package com.vdurmont.fakejedis;

/**
 * This exception is thrown when a Jedis method is called but hasn't been implemented in fake-jedis
 *
 * @author Vincent DURMONT [[email protected]]
 */
public class FakeJedisNotImplementedException extends UnsupportedOperationException {
    public FakeJedisNotImplementedException() {
        super("The method " + getCurrentMethodName() + " is not implemented in your version of FakeJedis. Contribute on github! https://github.com/vdurmont/fake-jedis");
    }

    private static String getCurrentMethodName() {
        StackTraceElement[] elements = Thread.currentThread().getStackTrace();
        if (elements.length < 4) {
            return "\"unknown\"";
        }
        return elements[3].toString();
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy