Starting to write functions to raises the exceptions