This moves `handle_render_command_error` out to the crate root so that it can later be shared with `CmdPreprocessor`.