Update of /cvsroot/monetdb/sql/src/backends/monet5
In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv1207

Modified Files:
        sql.mx 
Log Message:
throw can do formatting stuff (that was one of the points behind it), so
no need for a temporary buffer and separate formatting


U sql.mx
Index: sql.mx
===================================================================
RCS file: /cvsroot/monetdb/sql/src/backends/monet5/sql.mx,v
retrieving revision 1.355
retrieving revision 1.356
diff -u -d -r1.355 -r1.356
--- sql.mx      6 Sep 2009 08:32:10 -0000       1.355
+++ sql.mx      6 Sep 2009 09:01:14 -0000       1.356
@@ -1728,7 +1728,6 @@
        str *cname = (str *)getArgReference(stk, pci, 3);
        int *access = (int *)getArgReference(stk, pci, 4);
        oid lval,hval=0;
-       char buf[BUFSIZ];
 
        (void) cntxt;
        if (msg)
@@ -1747,8 +1746,7 @@
                BBPkeepref( *bid = b->batCacheid);
                return MAL_SUCCEED;
        }
-       snprintf(buf,BUFSIZ,"Could not find %s.%s(%s)",*sname, *tname, *cname);
-       throw(SQL, "sql.bind", buf);
+       throw(SQL, "sql.bind", "unable to find %s.%s(%s)", *sname, *tname, 
*cname);
 }
 
 
@@ -1765,7 +1763,6 @@
        str *iname = (str *)getArgReference(stk, pci, 3);
        int *access = (int *)getArgReference(stk, pci, 4);
        oid lval,hval=0;
-       char buf[BUFSIZ];
 
        (void) cntxt;
        if (msg)
@@ -1784,8 +1781,8 @@
                BBPkeepref( *bid = b->batCacheid);
                return MAL_SUCCEED;
        }
-       snprintf(buf,BUFSIZ,"Could not find index %s for %s.%s",*iname,*sname, 
*tname);
-       throw(SQL, "sql.idxbind", buf);
+       throw(SQL, "sql.idxbind", "unable to find index %s for %s.%s",
+                       *iname, *sname, *tname);
 }
 
 str 
@@ -1795,7 +1792,6 @@
        Client cntxt = mal_clients+*clientid;
        str msg = getContext(cntxt, NULL, &m, NULL);
        BAT *b;
-       char buf[BUFSIZ];
 
        if (msg)
                return msg;
@@ -1806,8 +1802,7 @@
                BBPkeepref( *bid = b->batCacheid);
                return MAL_SUCCEED;
        }
-       snprintf(buf,BUFSIZ,"Could not find index %s for %s.%s",*i,*s, *t);
-       throw(SQL, "sql.idxbind", buf);
+       throw(SQL, "sql.idxbind", "unable to find index %s for %s.%s", *i, *s, 
*t);
 }
 
 /*mvc_append_wrap(int *bid, str *sname, str *tname, str *cname, ptr d) */


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Monetdb-sql-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-sql-checkins

Reply via email to