Fix Unhandled Exception warning for error reporting

Fixes http://adsk-oss.myjetbrains.com/youtrack/issue/MAGN-2563