Raise exception when hive commands fail.

Previously, they were silently failing. Also,
seems that the exceptions are written to stderr,
so include that in the exception.