Improved error messages for runtime exceptions

Change-Id: I72770b0d53ce5792db7cc6aa9bfb15e047b32d3c