Check AutoDiff return code (#4058)
Merge pull request #4062 from dschwen/aderr_4058

Check AutoDiff return code