| // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| #include "sql/error_delegate_util.h" |
| #include "third_party/sqlite/sqlite3.h" |
| bool IsErrorCatastrophic(int error) { |
| // Theoretically, the wrapped delegate might have resolved the error, and |
| // Highly unlikely we would ever recover from these. |
| // TODO(erikwright): Figure out what this means. |
| // This could be broken blocks, in which case deleting the DB would be a |
| // good idea. But it might also be transient. |
| // TODO(erikwright): Figure out if we can distinguish between the two, |
| // or determine through metrics analysis to what extent these failures are |
| // Not a problem with the database. |
| // Presumably either transient or we don't have the privileges to |
| // move/delete the file anyway. |
| // These probgably indicate a programming error or a migration failure |
| // that we prefer not to mask. |
| // None of these appear in error reports, so for now let's not try to |
| // guess at how to handle them. |