Context.register() docstring tweaks; handle more error cases.