Created exceptions for all cases
Merge pull request #623 from psav/exceptions

Created exceptions for all cases