You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by rh...@apache.org on 2013/02/25 15:35:16 UTC
svn commit: r1449725 - /subversion/trunk/subversion/libsvn_subr/sqlite.c
Author: rhuijben
Date: Mon Feb 25 14:35:16 2013
New Revision: 1449725
URL: http://svn.apache.org/r1449725
Log:
* subversion/libsvn_subr/sqlite.c
(SQLITE_ERR,
SQLITE_ERR_MSG): Make it a tiny bit more visible that the sqlite error
codes are really error codes and not information of the message itself.
(internal_open): Use SQLITE_ERR_MSG and update comment.
Modified:
subversion/trunk/subversion/libsvn_subr/sqlite.c
Modified: subversion/trunk/subversion/libsvn_subr/sqlite.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/sqlite.c?rev=1449725&r1=1449724&r2=1449725&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_subr/sqlite.c (original)
+++ subversion/trunk/subversion/libsvn_subr/sqlite.c Mon Feb 25 14:35:16 2013
@@ -140,7 +140,7 @@ struct svn_sqlite__value_t
int sqlite_err__temp = (x); \
if (sqlite_err__temp != SQLITE_OK) \
return svn_error_createf(SQLITE_ERROR_CODE(sqlite_err__temp), \
- NULL, "sqlite: %s (%d)", \
+ NULL, "sqlite: %s (S%d)", \
sqlite3_errmsg((db)->db3), \
sqlite_err__temp); \
} while (0)
@@ -150,7 +150,7 @@ struct svn_sqlite__value_t
int sqlite_err__temp = (x); \
if (sqlite_err__temp != SQLITE_OK) \
return svn_error_createf(SQLITE_ERROR_CODE(sqlite_err__temp), \
- NULL, "sqlite: %s (%d)", (msg), \
+ NULL, "sqlite: %s (S%d)", (msg), \
sqlite_err__temp); \
} while (0)
@@ -782,7 +782,7 @@ internal_open(sqlite3 **db3, const char
occurs (except for out-of-memory); thus, we can safely use it to
extract an error message and construct an svn_error_t. */
{
- /* We'd like to use SQLITE_ERR_MSG here, but we can't since it would
+ /* We'd like to use SQLITE_ERR here, but we can't since it would
just return an error and leave the database open. So, we need to
do this manually. */
/* ### SQLITE_CANTOPEN */
@@ -796,9 +796,7 @@ internal_open(sqlite3 **db3, const char
error than the close error at this point. */
sqlite3_close(*db3);
- return svn_error_createf(SQLITE_ERROR_CODE(err_code), NULL,
- "sqlite: %s (%d): '%s'",
- msg, err_code, path);
+ SQLITE_ERR_MSG(err_code, msg);
}
}
}