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

Mircea Markus mircea.markus at jboss.com
Tue Mar 15 13:21:26 EDT 2011


On 15 Mar 2011, at 17:17, Emmanuel Bernard wrote:

> As David pointed out %1$ is superior to %s for internationalization.
Agreed.
Not sure we want i18n for logs and error messages (?)
> 
> 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
> 
> 
> _______________________________________________
> 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