com.selesse.jxlint.model.NonExistentCategoryException Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jxlint Show documentation
Show all versions of jxlint Show documentation
Framework for doing static analysis in Java
The newest version!
package com.selesse.jxlint.model;
import com.google.common.base.Joiner;
/**
* Specific {@link java.lang.Exception} for the case where a category was queried but did not exist.
*/
public class NonExistentCategoryException extends Exception {
private static final long serialVersionUID = 1L;
private String categoryName;
public NonExistentCategoryException(String categoryName, Iterable categories) {
super("Category '" + categoryName + "' does not exist. Try one of: " +
Joiner.on(", ").join(categories) + ".");
this.categoryName = categoryName;
}
/**
* Returns the category name that was queried but wasn't found.
*/
public String getRuleName() {
return categoryName;
}
}