Change autoclass to autoexception

Fixes #1388 or part thereof
Merge pull request #1450 from stevepiercy/1.5-branch

Change autoclass to autoexception - cherry pick from master