[ 
https://issues.apache.org/jira/browse/SOLR-1589?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12781260#action_12781260
 ] 

Chris A. Mattmann commented on SOLR-1589:
-----------------------------------------

bq. What would you have FieldValidationException inherit from?

Hey Yonik, well, now that you point that out, maybe SolrException is a good one 
to have it inherit from, setting a particular HTTP-type response code for the 
provided field value that's outside of the expected value range. Looking at the 
Solr error codes:

http://lucene.apache.org/solr/api/org/apache/solr/common/SolrException.ErrorCode.html

Maybe we should introduce an INVALID_VALUE constant, and then just make 
FieldValidationException extends SolrException, and make it call 
super(INVALID_VALUE...). Thoughts?

> Make FieldType#toInternal throw explicit Exceptions when Field values don't 
> validate
> ------------------------------------------------------------------------------------
>
>                 Key: SOLR-1589
>                 URL: https://issues.apache.org/jira/browse/SOLR-1589
>             Project: Solr
>          Issue Type: Improvement
>    Affects Versions: 1.4
>         Environment: My MacBook pro laptop.
>            Reporter: Chris A. Mattmann
>            Priority: Minor
>             Fix For: 1.5
>
>
> As discussed on the mailing list: 
> http://mail-archives.apache.org/mod_mbox/lucene-solr-dev/200911.mbox/%3c85641490-9e70-41b3-a32e-22935b688...@apache.org%3e
> I think we can do a better job of having explicit Exceptions when there is a 
> problem creating the internal representation of a Field, as defined by 
> FieldType#toInternal. Instead of throwing obscure RuntimeExceptions, let's 
> create a FieldValidationException explicit type, and make 
> o.a.solr.schema.FieldType#toInternal throw this Exception as part of its 
> signature.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to