Change autoclass to autoexception

Fixes #1388 or part thereof
Merge pull request #1445 from bertjwregeer/fix.exceptions

Change autoclass to autoexception