private void tryOnBadIntervalException(double startValue, double endValue, double step) {
        try {
            if (startValue < Integer.MIN_VALUE || endValue > Integer.MAX_VALUE) {
                throw new BadIntervalException("Invalid borders of interval!");
            }

            if (endValue <= startValue) {
                throw new BadIntervalException("Start of interval bigger than end of interval!");
            }

            if ((startValue + step) >= endValue) {
                throw new BadIntervalException("Step can not be applied to given interval: start value with step bigger than end of interval!");
            }
        } catch (BadIntervalException ex) {
            Logger.getLogger(StateParameter.class.getName()).log(Level.SEVERE, null, ex);
        }
    }