Improving the input error message and avoiding the exit call

The error message of the example was not clear to me, so I have made it a tad more clear.

Also, it raises a ValueError instead of a raw exit because it contains more information.