Create exception class
Add exception codes to thrown exceptions
Merge pull request #3 from ob-ivan/exception

Add exception class and codes