[ 
https://issues.apache.org/jira/browse/THRIFT-3873?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15681333#comment-15681333
 ] 

ASF GitHub Bot commented on THRIFT-3873:
----------------------------------------

Github user jeking3 commented on a diff in the pull request:

    https://github.com/apache/thrift/pull/1128#discussion_r88804076
  
    --- Diff: compiler/cpp/src/thrift/generate/t_erl_generator.cc ---
    @@ -968,10 +969,13 @@ void t_erl_generator::export_string(string name, int 
num) {
     }
     
     void t_erl_generator::export_types_function(t_function* tfunction, string 
prefix) {
    -
    +  t_struct::members_type::size_type num = 
tfunction->get_arglist()->get_members().size();
    +  if (num > std::numeric_limits<int>().max()) {
    +    throw "integer overflow in t_erl_generator::export_types_function, 
name " + tfunction->get_name();
    --- End diff --
    
    Throwing std::string or char * is a pattern used throughout the compiler 
code.  While I agree with you this is not something that should be done, I was 
following what was already there for continuity and maintainability.  
    
    I filed https://issues.apache.org/jira/browse/THRIFT-3982 to cover this 
issue across the compiler codebase.  As such, I would like to request this 
remain.


> Fix various compiler warnings when using VS2010
> -----------------------------------------------
>
>                 Key: THRIFT-3873
>                 URL: https://issues.apache.org/jira/browse/THRIFT-3873
>             Project: Thrift
>          Issue Type: Bug
>          Components: C++ - Library
>    Affects Versions: 0.10.0
>         Environment: VS2010, Windows
>            Reporter: James E. King, III
>            Assignee: James E. King, III
>            Priority: Trivial
>
> While verifying a defect I had to build the windows thrift C++ library and 
> found a number of compiler warnings that needed to be cleaned up.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to