Changeset: 12fedeb34b95 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=12fedeb34b95
Modified Files:
        monetdb5/mal/mal_client.mx
Branch: Aug2011
Log Message:

mal_client: move error reporting to client in MCfindClient


diffs (38 lines):

diff --git a/monetdb5/mal/mal_client.mx b/monetdb5/mal/mal_client.mx
--- a/monetdb5/mal/mal_client.mx
+++ b/monetdb5/mal/mal_client.mx
@@ -415,13 +415,20 @@ MCfindClient(oid user, str scen, bstream
        Client c = NULL;
        Scenario s = findScenario(scen);
 
-       if (!s)
+       if (!s) {
+               showException(MAL, "findClient",
+                               "findScenario returned NULL for '%s'", scen);
+               mnstr_printf(fout, "!could not find scenario '%s'\n", scen);
+               mnstr_flush(fout);
                return NULL;
+       }
 
        mal_set_lock(mal_contextLock, "newClient");
        if (mal_clients[CONSOLE].user && mal_clients[CONSOLE].mode == 
FINISHING) {
                showException(MAL, "newClient", "system shutdown in progress");
                mal_unset_lock(mal_contextLock, "newClient");
+               mnstr_printf(fout, "!system shutdown in progress, please try 
again later\n");
+               mnstr_flush(fout);
                return NULL;
        }
        for (c = mal_clients; c < mal_clients + MAL_MAXCLIENTS; c++) {
@@ -437,8 +444,11 @@ MCfindClient(oid user, str scen, bstream
        }
        mal_unset_lock(mal_contextLock, "newClient");
 
-       if (c == mal_clients + MAL_MAXCLIENTS)
+       if (c == mal_clients + MAL_MAXCLIENTS) {
+               mnstr_printf(fout, "!maximum concurrent clients limit reached 
(%d), please try again later\n", MAL_MAXCLIENTS);
+               mnstr_flush(fout);
                return NULL;
+       }
 #ifdef MAL_CLIENT_DEBUG
        printf("Client found %d\n", c->idx);
 #endif
_______________________________________________
Checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list

Reply via email to