Handle errors in expression class