fix Issue 10382 - ICE when catching illegal type
Merge pull request #2190 from 9rnsr/fix10382

[REG2.059] Issue 10382 - ICE when catching illegal type