Skip to content
This repository has been archived by the owner on Nov 8, 2021. It is now read-only.

Set the base exception message to something useful #44

Merged
merged 1 commit into from
Nov 23, 2017

Conversation

danzel
Copy link
Contributor

@danzel danzel commented Nov 23, 2017

Any error logger will look at either the Message field or use ToString() when logging an exception.
As we do not set Message, there will be no useful information in that log message when logging a FaceAPIException.
You instead get:
Microsoft.ProjectOxford.Face.FaceAPIException: Exception of type 'Microsoft.ProjectOxford.Face.FaceAPIException' was thrown.

Now we set base.Message (via the constructor) so that we get useful error logs :)

Fixes microsoft/Cognitive-Face-DotNetCore#3 (once this targets standard and obsoletes that repo too...)

@huxuan huxuan self-requested a review November 23, 2017 04:27
@huxuan huxuan merged commit 4cf8a4f into microsoft:master Nov 23, 2017
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.

2 participants