public static void failIfNotNumeric(Function function, Type type) throws IncompatibleTypesException { if (!TypeFactory.isNumerical(type.getTypeCode())) { throw new IncompatibleTypesException( "Function " + function.getName() + " only operates with numerical types. " + TypeFactory.getTypeName(type.getTypeCode()) + " found"); } }
public static void failIfNotNumeric( final CustomQuery customQuery, final Type type, final int argNumber) throws IncompatibleTypesException { if (!TypeFactory.isNumerical(type.getTypeCode())) { throw new IncompatibleTypesException( customQuery.getName() + " requires a numerical type as argument number " + argNumber + ". " + TypeFactory.getTypeName(type.getTypeCode()) + " found"); } }