diff options
Diffstat (limited to 'sql/connection.h')
-rw-r--r-- | sql/connection.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/sql/connection.h b/sql/connection.h index 8cf4d71..b9f45ec 100644 --- a/sql/connection.h +++ b/sql/connection.h @@ -143,6 +143,13 @@ class SQL_EXPORT Connection { error_delegate_.reset(delegate); } + // SQLite error codes for errors on all connections are logged to + // enum histogram "Sqlite.Error". Setting this additionally logs + // errors to the histogram |name|. + void set_error_histogram_name(const std::string& name) { + error_histogram_name_ = name; + } + // Initialization ------------------------------------------------------------ // Initializes the SQL connection for the given file, returning true if the @@ -457,6 +464,9 @@ class SQL_EXPORT Connection { // commands or statements. It can be null which means default handling. scoped_ptr<ErrorDelegate> error_delegate_; + // Auxiliary error-code histogram. + std::string error_histogram_name_; + DISALLOW_COPY_AND_ASSIGN(Connection); }; |