mirror of
https://github.com/HeyPuter/firefox.git
synced 2026-11-25 02:40:22 -10:00
The `nsresult` codes that mozStorage returns are often too generic. For example, `NS_ERROR_FAILURE` might be anything from a SQL syntax error to an invalid column name in a trigger. This commit adds a `Conn::call_and_wrap_error` helper that checks the last SQLite error, and returns that instead of `nsresult`. Not all errors are SQLite errors, however, so we only use this for mozStorage methods that return `convertResultCode`. Differential Revision: https://phabricator.services.mozilla.com/D25179