+ if (res != ZEBRA_OK)
+ {
+ const char *add = zebra_errAdd(zh);
+ yaz_log(YLOG_FATAL, "Operation failed: %s %s",
+ zebra_errString(zh), add ? add : "");
+
+ if (trans_started)
+ if (zebra_end_trans (zh) != ZEBRA_OK)
+ yaz_log (YLOG_WARN, "zebra_end_trans failed");
+
+
+ zebra_close (zh);
+ zebra_stop (zs);
+ exit(1);
+ }