Replaced RuntimeErrors with specific errors

Change-Id: Ief2e74fa07e4c5168f5cc00fd4017d80331cb180
Closes-Bug: #1199071
Merge "Replaced RuntimeErrors with specific errors"