Skip to content
This repository was archived by the owner on Mar 19, 2019. It is now read-only.

Implemented OnResponseCompleted #92

Merged
merged 1 commit into from
Mar 17, 2015
Merged

Implemented OnResponseCompleted #92

merged 1 commit into from
Mar 17, 2015

Conversation

ajaybhargavb
Copy link
Contributor

}

// Execute last to first. This mimics a stack unwind.
foreach (var actionPair in actions.Reverse())
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Catch and suppress any Exceptions, otherwise the rest of Dispose won't run and you'll have a resource leak.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we log any exceptions that occur?

@@ -147,4 +147,7 @@
<data name="Exception_WrongIAsyncResult" xml:space="preserve">
<value>The given IAsyncResult does not match this opperation.</value>
</data>
<data name="Warning_ExceptionInOnResponseCompletedAction" xml:space="preserve">
<value>Exception occured in a registered response completed action.</value>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Recommended slight rewording (and fixing typo 😄): An exception occurred while disposing a component registered with {0}. and then pass in nameof(OnResponseCompleted) for the {0}.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It doesn't necessarily have to be dispose. Any action can be registered to be performed in OnResponseCompleted. So not sure if we should say "while disposing".

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh good point! How about: An exception occurred while running an action registered with {0}.

@ajaybhargavb ajaybhargavb merged commit 39b8d20 into dev Mar 17, 2015
@Tratcher Tratcher deleted the response-feature branch May 28, 2015 23:29
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants