DRILL-7506: Simplify code gen error handling
Pushes code gen error handling close to the code gen itself to
allow clearer error messages. Doing so avoids the need to bubble
code gen exceptions up the call stack, resulting in cleaner
operator code.
closes #1948