2020-10-30 20:34:04 +00:00
|
|
|
// Copyright 2014-2020 Signal Messenger, LLC
|
|
|
|
// SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
|
2018-05-02 20:42:15 +00:00
|
|
|
/* global Whisper: false */
|
2018-03-08 01:27:35 +00:00
|
|
|
|
2018-03-08 00:15:14 +00:00
|
|
|
// eslint-disable-next-line func-names
|
2018-04-27 21:25:04 +00:00
|
|
|
(function() {
|
2018-03-08 00:15:14 +00:00
|
|
|
window.Whisper = window.Whisper || {};
|
|
|
|
window.Whisper.Database = window.Whisper.Database || {};
|
|
|
|
window.Whisper.Database.id = window.Whisper.Database.id || 'signal';
|
|
|
|
window.Whisper.Database.nolog = true;
|
2014-11-13 22:35:37 +00:00
|
|
|
|
2018-03-08 00:16:03 +00:00
|
|
|
Whisper.Database.handleDOMException = (prefix, error, reject) => {
|
2018-07-21 19:00:08 +00:00
|
|
|
window.log.error(
|
2018-03-08 00:16:03 +00:00
|
|
|
`${prefix}:`,
|
|
|
|
error && error.name,
|
|
|
|
error && error.message,
|
|
|
|
error && error.code
|
|
|
|
);
|
|
|
|
reject(error || new Error(prefix));
|
|
|
|
};
|
2018-04-27 21:25:04 +00:00
|
|
|
})();
|