Loading ...
Sorry, an error occurred while loading the content.

1418Re: [jslint] Re: Calling With Too Much Parameters

Expand Messages
  • Jean-Charles Meyrignac
    Aug 10, 2010
      On Wed, Aug 11, 2010 at 7:49 AM, pauanyu <pcxunlimited@...> wrote:

      >
      >
      > Don't forget that it's possible to access the non-named parameters using
      > the "arguments" object.
      >
      > Thanks, I forgot that.


      > I suppose if the function does not access the arguments object, then
      > throwing a warning or error in that case might be nice.
      >
      > A warning is enough, and would help locating weird calls.


      > In any case, if the function is called with more arguments than it expects,
      > it simply ignores the excess. I'm not sure why that would cause a bug in the
      > plugin.
      >
      > The routine was called with arguments (url, login, password, callback).
      And the routine was declared with (url, server, callback), with server =
      {login, password}
      So 'password' was used instead of 'callback'.
      It seems that a refactoring gone wrong..

      JC


      [Non-text portions of this message have been removed]
    • Show all 8 messages in this topic