Checking on thrown error