Raise a anvil exception instead of runtime.

Change-Id: I6a5833e637ba95d945eb17982b693ae706c0fb12