implement the exceptions