Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parameters passed to the error-handling callback of function 'send' #2724

Closed
barakman opened this issue Apr 24, 2019 · 0 comments
Closed

Parameters passed to the error-handling callback of function 'send' #2724

barakman opened this issue Apr 24, 2019 · 0 comments
Labels
1.x 1.0 related issues Documentation Relates to project wiki or documentation

Comments

@barakman
Copy link
Contributor

barakman commented Apr 24, 2019

Description

Here is the coding example in the official documentation:

.on('error', console.error); // If there's an out of gas error the second parameter is the receipt.

This example makes the parameters passed to the error handler rather unclear.

I believe that instead of plugging in a known function, you should plug in your own function, thus explicitly stating the parameters passed to it (in a manner similar to the one used for all the other handlers, i.e. the transactionHash handler, the confirmation handler and the receipt handler).

Versions

  • web3.js: 1.x
  • nodejs: not relevant
  • browser: not relevant
  • ethereum node: not relevant
@nivida nivida added the Documentation Relates to project wiki or documentation label Apr 24, 2019
@nivida nivida added the 1.x 1.0 related issues label Jun 20, 2019
nivida added a commit that referenced this issue Oct 23, 2019
nivida added a commit that referenced this issue Oct 24, 2019
@nivida nivida closed this as completed Oct 24, 2019
nachomazzara pushed a commit to nachomazzara/web3.js that referenced this issue Jun 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1.x 1.0 related issues Documentation Relates to project wiki or documentation
Projects
None yet
Development

No branches or pull requests

2 participants