[infinispan-dev] use %s syntax for formatting exception messages

Emmanuel Bernard emmanuel at hibernate.org
Tue Mar 15 13:17:57 EDT 2011


As David pointed out %1$ is superior to %s for internationalization.

On 15 mars 2011, at 18:13, Manik Surtani wrote:

> Yeah, I currently do:
> 
> 	throw new ConfigurationException(String.format("you 're not allowed to use %s and %s together", that, other));
> 
> but we could overload the constructor of CacheException ... 
> 
> On 15 Mar 2011, at 16:15, Mircea Markus wrote:
> 
>> Hi,
>> 
>> Not a biggie, but I think it would be nice to use this nicer syntax for exception messages, e.g.
>> throw new ConfigurationException("you 're not allowed to use %s and %s together", that, other);
>> wdyt?
>> 
>> Cheers,
>> Mircea 
>> 
>> _______________________________________________
>> infinispan-dev mailing list
>> infinispan-dev at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/infinispan-dev
> 
> --
> Manik Surtani
> manik at jboss.org
> twitter.com/maniksurtani
> 
> Lead, Infinispan
> http://www.infinispan.org
> 
> 
> 
> 
> _______________________________________________
> infinispan-dev mailing list
> infinispan-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/infinispan-dev




More information about the infinispan-dev mailing list