Update exception classes, fixes #4442