Change to supply non-NULL parameters for SC_set_error().
authorHiroshi Inoue <inoue@tpf.co.jp>
Sat, 22 Feb 2014 13:15:55 +0000 (22:15 +0900)
committerHiroshi Inoue <inoue@tpf.co.jp>
Sat, 22 Feb 2014 13:15:55 +0000 (22:15 +0900)
options.c
results.c
statement.c

index d49c7f9905ad7ff5cca5c7bcd344d9f45fa6347e..06523eb20211c4af5cd34d02deb058beab3fb665 100644 (file)
--- a/options.c
+++ b/options.c
@@ -261,7 +261,7 @@ set_statement_option(ConnectionClass *conn,
 
                if (stmt)
                {
-                   SC_set_error(stmt, STMT_NOT_IMPLEMENTED_ERROR, "Unknown statement option (Set)", NULL);
+                   SC_set_error(stmt, STMT_NOT_IMPLEMENTED_ERROR, "Unknown statement option (Set)", func);
                    sprintf(option, "fOption=%d, vParam=" FORMAT_ULEN, fOption, vParam);
                    SC_log_error(func, option, stmt);
                }
@@ -824,7 +824,7 @@ PGAPI_GetStmtOption(
            {
                char        option[64];
 
-               SC_set_error(stmt, STMT_NOT_IMPLEMENTED_ERROR, "Unknown statement option (Get)", NULL);
+               SC_set_error(stmt, STMT_NOT_IMPLEMENTED_ERROR, "Unknown statement option (Get)", func);
                sprintf(option, "fOption=%d", fOption);
                SC_log_error(func, option, stmt);
                return SQL_ERROR;
index d53c5415c69d4b4d8ed4774a2064e5e728e6c68f..dad6ea24c6d8381fe63772b7c177a74526a4bb32 100644 (file)
--- a/results.c
+++ b/results.c
@@ -327,7 +327,7 @@ inolog("answering bookmark info\n");
        res = SC_get_Curres(stmt);
        if (icol >= QR_NumPublicResultCols(res))
        {
-           SC_set_error(stmt, STMT_INVALID_COLUMN_NUMBER_ERROR, "Invalid column number in DescribeCol.", NULL);
+           SC_set_error(stmt, STMT_INVALID_COLUMN_NUMBER_ERROR, "Invalid column number in DescribeCol.", func);
            snprintf(buf, sizeof(buf), "Col#=%d, #Cols=%d,%d keys=%d", icol, QR_NumResultCols(res), QR_NumPublicResultCols(res), res->num_key_fields);
            SC_log_error(func, buf, stmt);
            result = SQL_ERROR;
index a7dad74df783f884e9670d0fd903ceab87ca7bbd..ee07973ab40fbeabf4f2eea00b5645fcefb04bb4 100644 (file)
@@ -1685,7 +1685,7 @@ inolog("%s statement=%p res=%x ommitted=0\n", func, self, res);
                    switch (QR_get_rstatus(res))
                    {
                        case PORES_NO_MEMORY_ERROR:
-                           SC_set_error(self, STMT_NO_MEMORY_ERROR, NULL, __FUNCTION__);
+                           SC_set_error(self, STMT_NO_MEMORY_ERROR, "memory allocation error???", __FUNCTION__);
                            break;
                        case PORES_BAD_RESPONSE:
                            SC_set_error(self, STMT_COMMUNICATION_ERROR, "communication error occured", __FUNCTION__);