[thumbnail] update try-except
Merge pull request #320 from haiwen/4.0-thumbnail-fix

[thumbnail] update try-except