public Number perform(Number left, Number right, InternalContextAdapter context) { /* * check for divide / modulo by 0 */ if (MathUtils.isZero(right)) { String msg = "Right side of modulus operation is zero. Must be non-zero. " + getLocation(context); if (strictMode) { log.error(msg); throw new MathException(msg); } else { log.debug(msg); return null; } } return MathUtils.modulo(left, right); }
public Number perform(Number left, Number right, InternalContextAdapter context) { /* * check for divide by 0 */ if (MathUtils.isZero(right)) { String msg = "Right side of division operation is zero. Must be non-zero. " + getLocation(context); if (strictMode) { log.error(msg); throw new MathException(msg); } else { log.debug(msg); return null; } } return MathUtils.divide(left, right); } }
throw new MathException(msg);
public Number perform(Number left, Number right, InternalContextAdapter context) { /* * check for divide by 0 */ if (MathUtils.isZero(right)) { String msg = "Right side of division operation is zero. Must be non-zero. " + getLocation(context); if (strictMode) { log.error(msg); throw new MathException(msg); } else { log.debug(msg); return null; } } return MathUtils.divide(left, right); } }
public Number perform(Number left, Number right, InternalContextAdapter context) { /* * check for divide by 0 */ if (MathUtils.isZero(right)) { String msg = "Right side of division operation is zero. Must be non-zero. " + getLocation(context); if (strictMode) { log.error(msg); throw new MathException(msg); } else { log.debug(msg); return null; } } return MathUtils.divide(left, right); } }
public Number perform(Number left, Number right, InternalContextAdapter context) { /* * check for divide / modulo by 0 */ if (MathUtils.isZero(right)) { String msg = "Right side of modulus operation is zero. Must be non-zero. " + getLocation(context); if (strictMode) { log.error(msg); throw new MathException(msg); } else { log.debug(msg); return null; } } return MathUtils.modulo(left, right); } }
public Number perform(Number left, Number right, InternalContextAdapter context) { /* * check for divide / modulo by 0 */ if (MathUtils.isZero(right)) { String msg = "Right side of modulus operation is zero. Must be non-zero. " + getLocation(context); if (strictMode) { log.error(msg); throw new MathException(msg); } else { log.debug(msg); return null; } } return MathUtils.modulo(left, right); } }
throw new MathException(msg);