Given below is a code snippet to validate a name. The snippet ensures that the name variable is not empty. Modify the snippet such that an exception is raised if the name variable is empty. Add the message Name cannot be empty in the exception object.