/** * Returns an exception string for a wrong key. * * @param key property key * @param found found value * @param allowed allowed values * @return exception * @throws SerializerException serializer exception */ public static SerializerException error( final Object key, final String found, final String... allowed) throws SerializerException { final TokenBuilder tb = new TokenBuilder(); tb.addExt(SERVAL, key, allowed[0]); for (int a = 1; a < allowed.length; ++a) tb.addExt(SERVAL2, allowed[a]); tb.addExt(SERVAL3, found); throw SERANY.thrwSerial(tb); }