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

Throw Error When Provider is not Initialized #39

Open
emilyrohrbough opened this issue Apr 11, 2019 · 0 comments
Open

Throw Error When Provider is not Initialized #39

emilyrohrbough opened this issue Apr 11, 2019 · 0 comments

Comments

@emilyrohrbough
Copy link

Please fill out the below template as best you can.

Description of Issue

Add meaningful error when Provider is not Initialized and a event is triggered or listener is added/called. For example, if Prover.trigger is called when the Provider has not been initialized, it attempts to access this.application which is created upon Provider.init(). If the Provider has not been initialized, it throws the error

Error: Cannot read property 'trigger' of undefined
at Provider.trigger

This is error does not make it immediately obvious that the issue is related to the Provider initialization.

Steps to Reproduce the Issue

  1. Setup an application which called Provider.trigger() without initializing the provider
  2. See error in the console

Expected Outcomes

  • Throw Error message saying something like "Cannot handle/perform because the Provider has not been initialized"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant