Checking if need to print exception