lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Doug Cutting <DCutt...@grandcentral.com>
Subject RE: Separating translatable strings
Date Wed, 05 Dec 2001 18:20:10 GMT
> From: Otis Gospodnetic [mailto:otis_gospodnetic@yahoo.com]
> 
> I thought this was a nice idea.  Is this something others 
> would like to see?

Sure, if it doesn't complicate the code too much.

I imagine it would change things like:
  throw new IOException(bar + " is not bazzed: " + foo);
to:
  throw new IOException(ErrorStrings.format("not.bazzed", new Object[]{bar,
foo});
or better yet:
  throw new LuceneException("not.bazzed", new Object[]{bar, foo});

It would be nice to see a proposal that details the new exception API.

In the ideal world, different exception classes would be used for different
error conditions.  User interfaces could then catch specific exceptions and
decide what to do.  Unfortunately Lucene's use of exceptions is not so good,
and applications end up just displaying error strings directly to users.  So
translating these error strings is probably useful.

Doug

--
To unsubscribe, e-mail:   <mailto:lucene-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:lucene-dev-help@jakarta.apache.org>


Mime
View raw message