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 1 commit into from Jun 24, 2016


Copy link

@chinadragon0515 chinadragon0515 commented Jun 23, 2016


This pull request fixes issue #432 .


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.

@chinadragon0515 chinadragon0515 force-pushed the chinadragon0515:model2 branch 3 times, most recently from 3fb294d to 99f46a8 Jun 23, 2016
model = api.GetModelAsync().Result;
catch (Exception e)

This comment has been minimized.


lewischeng-ms Jun 23, 2016

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

Copy link

@lewischeng-ms lewischeng-ms commented Jun 23, 2016

Looks good to me.

@chinadragon0515 chinadragon0515 force-pushed the chinadragon0515:model2 branch 2 times, most recently from dbb8062 to 39d8552 Jun 24, 2016
@chinadragon0515 chinadragon0515 force-pushed the chinadragon0515:model2 branch from 39d8552 to e605349 Jun 24, 2016
@chinadragon0515 chinadragon0515 merged commit e605349 into OData:master Jun 24, 2016
@chinadragon0515 chinadragon0515 deleted the chinadragon0515:model2 branch Jun 24, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants