Integer i = Caster.toInteger(res,null);
if(i==null) throw new FunctionException(pc,"ArraySort",2,"function","return value of the "+(udf instanceof Closure?"closure":"function ["+udf.getFunctionName()+"]")+" cannot be casted to a integer.",CasterException.createMessage(res, "integer"));
return i.intValue();
}
catch (PageException pe) {
throw new PageRuntimeException(pe);
}
}