You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
catch (Exception err)
{
switch (err.HResult)
{
case unchecked((int)0x88982F81): //WINCODEC_ERR_UNSUPPORTEDOPERATION
// If the encoder does not support writing a thumbnail, then try again
// but disable thumbnail generation.
encoder.IsThumbnailGenerated = false;
break;
default:
throw err;
}
}
You can see the code throw the err in switch that should rethrow possibility intended.
Suggestion:
try
{
await encoder.FlushAsync();
}
catch (Exception exception)
{
const int WINCODEC_ERR_UNSUPPORTEDOPERATION = unchecked((int) 0x88982F81);
switch (exception.HResult)
{
case WINCODEC_ERR_UNSUPPORTEDOPERATION:
// If the encoder does not support writing a thumbnail, then try again
// but disable thumbnail generation.
encoder.IsThumbnailGenerated = false;
break;
default:
throw;
}
}
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
ID: 6a90a712-3f5c-5dac-0d72-c980577ce411
Version Independent ID: 1fe8d3cb-0b7a-a121-0eaa-9d59ee15a215
Activity
laurenhughes commentedon Jun 5, 2018
Thank you for the suggestion, lindexi (@lindexi). I'll get the sample updated!
Merge pull request #530 from MicrosoftDocs/evmill-patch-1
Add Starship example (#530)
Main > Live sync (#565)
Merge main > Live (#599)