| Index: sql/connection.cc
|
| diff --git a/sql/connection.cc b/sql/connection.cc
|
| index ea3dacbb6ba025dc248590a40031cc4a508541f4..55d2929e32f9c7a56c619c926ca928d5588bd8d1 100644
|
| --- a/sql/connection.cc
|
| +++ b/sql/connection.cc
|
| @@ -604,8 +604,13 @@ void Connection::ClearCache() {
|
| }
|
|
|
| int Connection::OnSqliteError(int err, sql::Statement *stmt) {
|
| - if (error_delegate_.get())
|
| - return error_delegate_->OnError(err, this, stmt);
|
| + if (!error_delegates_.empty()) {
|
| + std::vector<scoped_refptr<ErrorDelegate> > delegates = error_delegates_;
|
| + for (size_t i = 0; err != SQLITE_OK && i < delegates.size(); ++i) {
|
| + err = delegates[i]->OnError(err, this, stmt);
|
| + }
|
| + return err;
|
| + }
|
| // The default handling is to assert on debug and to ignore on release.
|
| DLOG(FATAL) << GetErrorMessage();
|
| return err;
|
|
|