-
Notifications
You must be signed in to change notification settings - Fork 83
Fault Treatment at entry points of SDK #127
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
Merged
spencerwilson-optimizely
merged 13 commits into
master
from
zeeshan/faultInjectionAndTreatmentAtEntryPoints
Jun 28, 2018
Merged
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
127c9f3
Developed a small framework to run test suite programmatically repeat…
zashraf1985 cf161b2
Added faults to some places
zashraf1985 674d4a6
Added exceptions all over the SDK
zashraf1985 677773f
corrected a mistake in the code which throws error. fortunately, it d…
zashraf1985 efd272e
Merge branch 'master' into zeeshan/faultInjectionAndTreatmentAtEntryP…
zashraf1985 33fa72f
1) Added try/catch blocks at entry level
zashraf1985 315ea6d
Removed fault injection code to create Pull Request
zashraf1985 714f058
Merge branch 'master' into zeeshan/faultInjectionAndTreatmentAtEntryP…
zashraf1985 3bb16b3
Remove whitespace changes
spencerwilson-optimizely 01384bd
Made following modifications as per changes requested by @spencerwils…
zashraf1985 909412a
Delete remaining whitespace changes
spencerwilson-optimizely 1204eec
Delete commented out things
spencerwilson-optimizely c51da52
Make EventDispatcher comments more descriptive TODO comments
spencerwilson-optimizely File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NotificationCenter
is actually not an entry point to the SDK. This line within theOptimizely
constructor function, which in turn is only called from the package's publiccreateInstance
function, is the sole place that calls into any code from this module. This means that all of the changes in this file can be reverted:Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree to the extent of
NotificationCenter
constructor and that is the reason why you wont see a try/catch block inNotificationCenter
constructor. The reason to put try/catch blocks in other methods is because an instance ofNotificationCenter
is available to the consumer as a public member ofOptimizelyInstance
. Consumer application can calladdNotificationListener
,removeNotificationListener
,clearAllNotificationListeners
,clearNotificationListeners
,sendNotifications
usingNotificationCenter
instance. The idea was to have try/catch blocks on all the functions which can be directly called by consumer application so that if any of these function crashes because of an unexpected exception/error, it does not in turn crash the consumer application. If you still think we should revert it, please let me know.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh yes, you're right, excellent catch.
NotificationCenter
instance methods are entry points which I overlooked.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assume you agree this is correct and does not need to be reverted back. I am keeping it as is. let me know if my understanding is wrong.