Fixed issue with deprecated exception

Change-Id: Ic2f1fec236f193fa4b07ebfd96e878d86cc6ad37
Closes-Bug: #1298524