gracefully handle typos by throwing an exception with a message