Add KSError
Merge pull request #3292 from karelia/master

Add KSError