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

Better error messages for missing options #13

Open
hswick opened this issue Aug 30, 2018 · 2 comments
Open

Better error messages for missing options #13

hswick opened this issue Aug 30, 2018 · 2 comments
Labels
discussion Opening up for discussion with the world

Comments

@hswick
Copy link
Owner

hswick commented Aug 30, 2018

Thanks @pik694 exw3 will throw an error message if you don't include gas, from, or contract address in a transaction. Which helps with debugging.

Right now the error messages look like this:

** (MatchError) no match of right hand side value: {:error, :missing_gas}

Which is useful, and does tell what is going wrong. But I think it would be better if we could have a more readable and clear error message like

(MissingOptionsError) transaction request is missing the :gas field
@hswick hswick added the discussion Opening up for discussion with the world label Sep 3, 2018
@Pongch
Copy link

Pongch commented Sep 26, 2018

Hi, new to project (would like to contribute). So this would just be a simple modification to the handle_call function, just with a more human readable description ?

@hswick
Copy link
Owner Author

hswick commented Sep 26, 2018

Hi there! It's a bit more complicated than that. Its essentially modifying some of the behavior for check_option, example used here:
https://github.com/hswick/exw3/blob/master/lib/exw3.ex#L665
To be more human readable like you said.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion Opening up for discussion with the world
Projects
None yet
Development

No branches or pull requests

2 participants