Handle lexical errors in edit/run