Added internal error handling to editor