Menu ▾ ▴

#86 made error message for already defined label clearer

Stable
closed-fixed
NSIS (71)
5
2005-12-09
2005-12-06
No

build.cpp line 1000:

else ERROR_MSG("Error: label \"%s\" already declared in
section/function\n",name);

this would not clarify if it's a section or function
where the label is already defined in.
the following code would, just replace the whole line.

else ERROR_MSG("Error: label \"%s\" already declared in
%s\n",name,build_cursection_isfunc?"function":"section");

i think it should be implemented as its an easy task
and would make the error msg a bit more clear and
debugging easier.

Discussion

  • Anonymous

    Anonymous - 2005-12-06
    • labels: --> NSIS
    • milestone: --> Stable
    • assigned_to: nobody --> kichik
    • status: open --> open-works-for-me
     
  • Anonymous

    Anonymous - 2005-12-06

    Logged In: YES
    user_id=970495

    a bit shorter but works too:

    else ERROR_MSG("Error: label \"%s\" already declared in
    %s\n",name,build_cursection?"section":"function");

    (old one checked if function or not, new one checks if
    section or not)

     
  • Amir Szekely

    Amir Szekely - 2005-12-09
    • status: open-works-for-me --> closed-fixed
     
  • Amir Szekely

    Amir Szekely - 2005-12-09

    Logged In: YES
    user_id=584402

    The second version doesn't work because build_cursection is
    not NULL for functions as well. I've used the first version,
    thanks.

     

Log in to post a comment.