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

Improve model built exception been thrown #452

Merged
merged 1 commit into from Jun 24, 2016

Conversation

chinadragon0515
Copy link
Contributor

Issues

This pull request fixes issue #432 .

Description

If we use call api.GetModelAsync().Result, then the exception been thrown is wrapped and only inner exception has meaningful message.

If we change to await api.GetModelAsync(), then the exception been thrown will not be wrapped and the exception is meaningful.

{
model = api.GetModelAsync().Result;
}
catch (Exception e)
Copy link
Contributor

Choose a reason for hiding this comment

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

better use AggreateException and no need to check if it contains an InnerException (because it always has)

Copy link
Contributor

Choose a reason for hiding this comment

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

@lewischeng-ms
Copy link
Contributor

Looks good to me.

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.

None yet

3 participants