From: mar Date: Fri, 1 Sep 1989 15:01:57 +0000 (+0000) Subject: catch unexpected ingres errors in a more sensible manner X-Git-Tag: ASRSNAP1001~52 X-Git-Url: http://andersk.mit.edu/gitweb/moira.git/commitdiff_plain/e83ef509b3619d5bc68e8cf32ca264bd991d1679?hp=02ccf7ad23e2a3cee1cd08105903ce3cda7d658a catch unexpected ingres errors in a more sensible manner --- diff --git a/server/qrtn.qc b/server/qrtn.qc index a709f57a..013903f6 100644 --- a/server/qrtn.qc +++ b/server/qrtn.qc @@ -317,6 +317,12 @@ sms_process_query(cl, name, argc, argv_ro, action, actarg) } out: + if (status == SMS_SUCCESS && ingres_errno != 0) { + com_err(whoami, SMS_INTERNAL, "Server didn't notice INGRES ERROR %d", + ingres_errno); + status = sms_errcode; + } + if (q->type != RETRIEVE) { if (status == SMS_SUCCESS) { ## end transaction /* commit to this */ @@ -348,12 +354,6 @@ out: ## set lockmode session where readlock = system } - if (status == SMS_SUCCESS && ingres_errno != 0) { - critical_alert("SMS", "Server didn't notice INGRES ERROR %d", - ingres_errno); - status = SMS_INTERNAL; - } - if (status != SMS_SUCCESS && log_flags & LOG_RES) com_err(whoami, status, " (Query failed)"); return(status);