You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-dev@lucene.apache.org by "Ryan McKinley (JIRA)" <ji...@apache.org> on 2007/05/29 21:28:15 UTC

[jira] Created: (SOLR-249) deprecate SolrException( int, ... ) in favor of SolrException( enum, ... )

deprecate SolrException( int, ... ) in favor of SolrException( enum, ... )
--------------------------------------------------------------------------

                 Key: SOLR-249
                 URL: https://issues.apache.org/jira/browse/SOLR-249
             Project: Solr
          Issue Type: Improvement
            Reporter: Ryan McKinley
            Assignee: Ryan McKinley
            Priority: Minor


SolrException should return valid HTTP status codes.

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


[jira] Updated: (SOLR-249) deprecate SolrException( int, ... ) in favor of SolrException( enum, ... )

Posted by "Ryan McKinley (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SOLR-249?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ryan McKinley updated SOLR-249:
-------------------------------

    Attachment: SOLR-249-EnumErrorCode.patch

This adds an inner enum to SolrException:
public class SolrException extends RuntimeException {
  
  public enum ErrorCode {
    BAD_REQUEST( 400 ),
    NOT_FOUND( 404 ),
    SERVER_ERROR( 500 ),
    SERVICE_UNAVALIABLE( 503 );
    
    final int code;
    
    private ErrorCode( int c )
    {
      code = c;
    }
  };
...

- - - - - - -

This refactors all the errors to use the enum rather then number.

Do we want ErrorCode to have its own file?  


> deprecate SolrException( int, ... ) in favor of SolrException( enum, ... )
> --------------------------------------------------------------------------
>
>                 Key: SOLR-249
>                 URL: https://issues.apache.org/jira/browse/SOLR-249
>             Project: Solr
>          Issue Type: Improvement
>            Reporter: Ryan McKinley
>            Assignee: Ryan McKinley
>            Priority: Minor
>         Attachments: SOLR-249-EnumErrorCode.patch
>
>
> SolrException should return valid HTTP status codes.

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


[jira] Commented: (SOLR-249) deprecate SolrException( int, ... ) in favor of SolrException( enum, ... )

Posted by "Yonik Seeley (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-249?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12499945 ] 

Yonik Seeley commented on SOLR-249:
-----------------------------------

+1 for committing

> deprecate SolrException( int, ... ) in favor of SolrException( enum, ... )
> --------------------------------------------------------------------------
>
>                 Key: SOLR-249
>                 URL: https://issues.apache.org/jira/browse/SOLR-249
>             Project: Solr
>          Issue Type: Improvement
>            Reporter: Ryan McKinley
>            Assignee: Ryan McKinley
>            Priority: Minor
>         Attachments: SOLR-249-EnumErrorCode.patch, SOLR-249-EnumErrorCode.patch
>
>
> SolrException should return valid HTTP status codes.

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


[jira] Resolved: (SOLR-249) deprecate SolrException( int, ... ) in favor of SolrException( enum, ... )

Posted by "Ryan McKinley (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SOLR-249?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ryan McKinley resolved SOLR-249.
--------------------------------

       Resolution: Fixed
    Fix Version/s: 1.2

> deprecate SolrException( int, ... ) in favor of SolrException( enum, ... )
> --------------------------------------------------------------------------
>
>                 Key: SOLR-249
>                 URL: https://issues.apache.org/jira/browse/SOLR-249
>             Project: Solr
>          Issue Type: Improvement
>            Reporter: Ryan McKinley
>            Assignee: Ryan McKinley
>            Priority: Minor
>             Fix For: 1.2
>
>         Attachments: SOLR-249-EnumErrorCode.patch, SOLR-249-EnumErrorCode.patch
>
>
> SolrException should return valid HTTP status codes.

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


[jira] Updated: (SOLR-249) deprecate SolrException( int, ... ) in favor of SolrException( enum, ... )

Posted by "Ryan McKinley (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SOLR-249?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ryan McKinley updated SOLR-249:
-------------------------------

    Attachment: SOLR-249-EnumErrorCode.patch

oh spelling...

> deprecate SolrException( int, ... ) in favor of SolrException( enum, ... )
> --------------------------------------------------------------------------
>
>                 Key: SOLR-249
>                 URL: https://issues.apache.org/jira/browse/SOLR-249
>             Project: Solr
>          Issue Type: Improvement
>            Reporter: Ryan McKinley
>            Assignee: Ryan McKinley
>            Priority: Minor
>         Attachments: SOLR-249-EnumErrorCode.patch, SOLR-249-EnumErrorCode.patch
>
>
> SolrException should return valid HTTP status codes.

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


[jira] Commented: (SOLR-249) deprecate SolrException( int, ... ) in favor of SolrException( enum, ... )

Posted by "Otis Gospodnetic (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-249?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12499939 ] 

Otis Gospodnetic commented on SOLR-249:
---------------------------------------

Looks good to me after UNAVALIABLE -> UNAVAILABLE

> deprecate SolrException( int, ... ) in favor of SolrException( enum, ... )
> --------------------------------------------------------------------------
>
>                 Key: SOLR-249
>                 URL: https://issues.apache.org/jira/browse/SOLR-249
>             Project: Solr
>          Issue Type: Improvement
>            Reporter: Ryan McKinley
>            Assignee: Ryan McKinley
>            Priority: Minor
>         Attachments: SOLR-249-EnumErrorCode.patch
>
>
> SolrException should return valid HTTP status codes.

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