Fix EZP-23495: Catch correct exception
Merge pull request #1043 from wizhippo/ezimage-exception-fix

Fix EZP-23495: Catch correct exception