Re: Proper ways to handle errors in BaseTokenFilterFactory subclasses

2007-05-30 Thread Ryan McKinley
Sorry, for 1.1, use: throw new SolrException( 500, "... " ); the ErrorCode enum was added in 1.2 -- that should be out *very* soon. Teruhiko Kurosaka wrote: Ryan, Thank you for your reply, but I can't find this class SolrException.ErrorCode in Solr 1.1. The Solr source seems to be giving a

RE: Proper ways to handle errors in BaseTokenFilterFactory subclasses

2007-05-30 Thread Teruhiko Kurosaka
Ryan, Thank you for your reply, but I can't find this class SolrException.ErrorCode in Solr 1.1. The Solr source seems to be giving a random number, 400, 500, etc. for the first arg to SolrException constructor. (Is there any unwritten convention?) Is SolrException.ErrorCode new to the latest versi

Re: Proper ways to handle errors in BaseTokenFilterFactory subclasses

2007-05-29 Thread Ryan McKinley
Teruhiko Kurosaka wrote: When the parameter to a token filter is out of range, or a mandatory paramter is not given, what is the proper way to fail in the init() and crate() methods? Should I throw an RuntimeException? Or should I simply call SolrCore.log.severe(message)? Is it OK for create() t

Proper ways to handle errors in BaseTokenFilterFactory subclasses

2007-05-29 Thread Teruhiko Kurosaka
When the parameter to a token filter is out of range, or a mandatory paramter is not given, what is the proper way to fail in the init() and crate() methods? Should I throw an RuntimeException? Or should I simply call SolrCore.log.severe(message)? Is it OK for create() to return null when the unde