-
Notifications
You must be signed in to change notification settings - Fork 317
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Handle exceptions during update so that they do not break subsequent …
…updates (#607) * Handle exceptions during update so that they do not break subsequent updates Fixes #262. Catch exceptions during update and ensure the element marks itself as finished updating. Note, this change also ensures the `updateComplete` promise is rejected if there's an exception during update. * update tests consistently to use helper to add/remove test elements * Fix lint error * Address review feedback * Address review feedback. * Refines error handling based on review * `shouldUpdate`/`update` are try/caught so that the element state is ok for further updates if an exception is thrown * `firstUpdated`/`updated` are not called if there's an update exception * `performUpdate` is try/caught only to reject the update promise. This is done to handle an override producing an exception. * a private version `_requestUpdate` is called in the property setter to avoid accessing the overridable `updateComplete` promise. * Added additional js doc comments. * Simplify promise check and fix lint errors
- Loading branch information
1 parent
5b21b7e
commit 3fb5cda
Showing
4 changed files
with
349 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.