Skip to content

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.

@chinadragon0515 chinadragon0515 force-pushed the model2 branch 2 times, most recently from dbb8062 to 39d8552 Compare June 24, 2016 01:24
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.

3 participants