Update of /cvsroot/monetdb/sql/src/backends/monet5
In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv31192/backends/monet5

Modified Files:
        sql_scenario.mx 
Log Message:
throw normal exceptions, such that we have a formatted string +
identation


Index: sql_scenario.mx
===================================================================
RCS file: /cvsroot/monetdb/sql/src/backends/monet5/sql_scenario.mx,v
retrieving revision 1.273
retrieving revision 1.274
diff -u -d -r1.273 -r1.274
--- sql_scenario.mx     16 Jul 2007 15:45:40 -0000      1.273
+++ sql_scenario.mx     26 Jul 2007 11:21:12 -0000      1.274
@@ -1167,22 +1167,19 @@
                        GDKfree(argv);
                if( pci->retc >= MAXARG)
                        GDKfree(argrec);
-               return _strdup("wrong number of arguments for prepared 
statement\n");
+               throw(SQL, "sql.prepare", "wrong number of arguments for 
prepared statement: %d, expected %d", argc, parc);
        } else {
                for (i = 0; i<c->argc; i++){
                        atom *arg = c->args[i];
                        sql_subtype *pt = q->params+i;
 
                        if (!atom_cast(arg, pt)) {
-                               char buf[BUFSIZ];
-
-                               snprintf(buf, BUFSIZ, "wrong argument for 
prepared statement (expected %s instead of %s)\n", pt->type->sqlname, 
atom_type(arg)->type->sqlname);
                                /*sql_error(c, 003, buf); */
                                if( pci->argc >= MAXARG)
                                        GDKfree(argv);
                                if( pci->retc >= MAXARG)
-                                               GDKfree(argrec);
-                               return _strdup(buf);
+                                       GDKfree(argrec);
+                               throw(SQL, "sql.prepare", "wrong argument for 
prepared statement (expected %s instead of %s)", pt->type->sqlname, 
atom_type(arg)->type->sqlname);
                        }
                        argv[pci->retc+i]= &arg->data;
                }


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Monetdb-sql-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-sql-checkins

Reply via email to