Skip to content

Conversation

@rabbah
Copy link
Member

@rabbah rabbah commented Jul 7, 2018

Adds a check in the init-handler to report an error if initialization is attempted more than once.

Also:

  • Moves state setting out of doInit so that all state setting is localized to the route handlers.
  • Moves console.error messages around so that they appear before the sentinel on init and run errors.

@tysonnorris having thought about this in the context of #41, I think we can achieve both mode by guarding the check in the run handler but leaving state otherwise in place.

Closes #70.

@rabbah rabbah requested a review from dgrove-oss July 7, 2018 13:31
@rabbah rabbah force-pushed the init-once branch 4 times, most recently from ee1a31d to 0e0856e Compare July 8, 2018 00:25
@rabbah rabbah changed the title Tightens logic so as not to permit initialization more than once. Tightens logic to report more meanigful error message when attempting to initialize more than once. Jul 9, 2018
@rabbah rabbah changed the title Tightens logic to report more meanigful error message when attempting to initialize more than once. Tightens logic and reports more meanigful error message when attempting to initialize more than once. Jul 9, 2018
rabbah added 2 commits July 9, 2018 11:22
…tion is attempted more than once.

Also:
- Moved state setting out of doInit so that all state setting is localized to the route handlers.
- Moved console.error messages around so that they appear before the sentinel on init and run errors.
@dgrove-oss dgrove-oss merged commit 184f130 into apache:master Jul 9, 2018
@rabbah rabbah deleted the init-once branch June 24, 2019 19:03
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

Successfully merging this pull request may close these issues.

2 participants