package histogram; public class NegativeValueException extends Exception { private int i; private double valeur; public NegativeValueException(int i, double valeur) { this.i = i; this.valeur = valeur; } public int index() { return i; } public double valeur() { return valeur; } public String getMessage() { return "Negative Value " + valeur + " at index " + i; } }