Added exception handling in custom testcases