Added exceptions.
Merge pull request #1 from koden-km/feature/exceptions

Added exceptions.