Added custom exception module.
Added Rspec test cases.