[SPARK-4274] [SQL] Print informative message while logical plan analyzing failed in test

In what case does the `toString` throw an exception?  I think thats the real bug.  Is it because `Code Generation: ${executedPlan.codegenEnabled}` is not wrapped in `stringOrError`?