allow passing message to IDBRequestError

This commit is contained in:
Bruno Windels 2020-09-29 11:50:10 +02:00
parent 43d430fc98
commit 482b5f4d22

View file

@ -41,10 +41,10 @@ export class IDBError extends StorageError {
}
export class IDBRequestError extends IDBError {
constructor(request) {
constructor(request, message = "IDBRequest failed") {
const source = request?.source;
const cause = request.error;
super(`IDBRequest failed`, source, cause);
super(message, source, cause);
}
}