Use the error-handler for register errors.

If a register is out of bounds then use the registered error-handler
to be consistent.
Added helpers to get the contents of string|int registers.

This avoids the need for doing testing all over the place.