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

Unused e from catch(e)

Expand Messages
  • Fred Lorrain
    If I have such kind of code try { something } catch (e) {} Means I don t care about e, I will not use it. Unfortunately I have to write catch(e) because catch
    Message 1 of 2 , Mar 23, 2009
    • 0 Attachment
      If I have such kind of code

      try {
      something
      }
      catch (e) {}

      Means I don't care about e, I will not use it.
      Unfortunately I have to write catch(e) because catch must have an
      argument.

      The validation will return in the listing of variables:
      Unused e

      Of course this is trivial, but is there a way to avoid it ?
      Maybe it's not good practice to not set anything in catch(e) ?



      [Non-text portions of this message have been removed]
    • Douglas Crockford
      ... Fixed. Thanks.
      Message 2 of 2 , Mar 23, 2009
      • 0 Attachment
        --- In jslint_com@yahoogroups.com, "Fred Lorrain" <yahoo@...> wrote:
        >
        > If I have such kind of code
        >
        > try {
        > something
        > }
        > catch (e) {}
        >
        > Means I don't care about e, I will not use it.
        > Unfortunately I have to write catch(e) because catch must have an
        > argument.
        >
        > The validation will return in the listing of variables:
        > Unused e
        >
        > Of course this is trivial, but is there a way to avoid it ?

        Fixed. Thanks.
      Your message has been successfully submitted and would be delivered to recipients shortly.