signal-desktop/js/database.js

23 lines
635 B
JavaScript
Raw Normal View History

2020-10-30 20:34:04 +00:00
// Copyright 2014-2020 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only
/* global Whisper: false */
2018-03-08 00:15:14 +00:00
// eslint-disable-next-line func-names
(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;
Whisper.Database.handleDOMException = (prefix, error, reject) => {
window.log.error(
`${prefix}:`,
error && error.name,
error && error.message,
error && error.code
);
reject(error || new Error(prefix));
};
2018-04-27 21:25:04 +00:00
})();