Fixed incorrect use of RuntimeError

Change-Id: Ia1cd3e23410c64fe1f557586e24776c594b8cfb7
Closes-Bug: #1296990
Merge "Fixed incorrect use of RuntimeError"