Move errors to variables so they can be matched against