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

org.wikimedia.search.extra.regex.UnableToAccelerateRegexException Maven / Gradle / Ivy

There is a newer version: 7.10.2-wmf12
Show newest version
package org.wikimedia.search.extra.regex;

import java.util.Locale;

import javax.annotation.Nullable;

/**
 * Thrown when the filter is unable to accelerate a regex and
 * rejectUnaccelerated is set.
 */
public class UnableToAccelerateRegexException extends RuntimeException {
    private static final long serialVersionUID = 2685216158813374775L;

    public UnableToAccelerateRegexException(String regex, int gramSize, @Nullable String ngramField) {
        super(String.format(Locale.ROOT, "Unable to accelerate \"%s\" with %s sized grams stored in %s", regex, gramSize, ngramField));
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy