fix Issue 10288 - Direct lambda call and purity inference bug
Immediately returns ErrorExp if an error occurs
Merge pull request #2143 from 9rnsr/fix10288

Issue 10288 - Direct lambda call and purity inference bug