EDIT to pass errors to the error handling method, put me in my own class