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 random number,
400, 500, etc. for the first arg to SolrException
constructor. (Is there any unwritten convention?)
Is SolrException.ErrorCode new to the latest version?
What would you suggest if I need to write a plugin
for Solr 1.1?
-kuro
You should throw a SolrException with a useful error message:
throw new SolrException( SolrException.ErrorCode.SERVER_ERROR,
"useful error here..." );