Added exceptions in BinarySearch.cpp