这是indexloc提供的服务,不要输入任何密码
Skip to content

Update QuotaExceededError usage #463

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 15 additions & 19 deletions index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -1807,12 +1807,11 @@ store.put(4); // will throw DataError
# Exceptions # {#exceptions}
<!-- ============================================================ -->

Each of the exceptions used in this document is a
{{DOMException}} with a specific type. The exception types and
properties such as legacy code value are defined in [[!WEBIDL]].
Each of the exceptions used in this document is a {{DOMException}}
or {{DOMException}}-derived interface, as defined in [[!WEBIDL]].

The table below lists the {{DOMException}}s used in this
document along with a description of the exception type's
The table below lists the {{DOMException}} names used in this
document along with a description of the exception's
usage.

<table class=props>
Expand Down Expand Up @@ -1868,14 +1867,6 @@ usage.
the requested data could not be read.
</td>
</tr>
<tr>
<td>{{QuotaExceededError}}</td>
<td>
The operation failed because there was not enough remaining
storage space, or the storage quota was reached and the user
declined to give more space to the database.
</td>
</tr>
<tr>
<td>{{SyntaxError}}</td>
<td>The keyPath argument contains an invalid key path.</td>
Expand Down Expand Up @@ -1907,6 +1898,11 @@ usage.
</tr>
</table>

Apart from the above {{DOMException}} names, the {{QuotaExceededError}}
exception type is to be used if the operation failed because there was
not enough remaining storage space, or the storage quota was reached and
the user declined to give more space to the database.

NOTE:
Given that multiple Indexed DB operations can throw the same type of
error, and that even a single operation can throw the same type of
Expand Down Expand Up @@ -2581,7 +2577,7 @@ reasons. Such implementations must still create and return an
creating the [=/object store=] has failed, it must abort the
transaction using the steps to [=abort a transaction=] using the
appropriate error. For example if creating the [=/object store=]
failed due to quota reasons, a "{{QuotaExceededError}}" {{DOMException}} must be used as
failed due to quota reasons, a {{QuotaExceededError}} must be used as
error.


Expand Down Expand Up @@ -3486,7 +3482,7 @@ and once the implementation determines that creating the index has
failed, it must run the steps to [=abort
a transaction=] using an appropriate error. For example
if creating the [=/index=] failed due to quota reasons,
a "{{QuotaExceededError}}" {{DOMException}} must be used as error and if the index can't be
a {{QuotaExceededError}} must be used as error and if the index can't be
created due to [=index/unique flag=] constraints, a "{{ConstraintError}}" {{DOMException}}
must be used as error.

Expand Down Expand Up @@ -4780,7 +4776,7 @@ NOTE:
due to an uncaught exception in an event handler, the error will be
a "{{AbortError}}" {{DOMException}}. If the [=/transaction=] was aborted due to
an error while committing, it will reflect the reason for the
failure (e.g. "{{QuotaExceededError}}", "{{ConstraintError}}", or
failure (e.g. a {{QuotaExceededError}}, or a "{{ConstraintError}}" or
"{{UnknownError}}" {{DOMException}}).

<div class="domintro note">
Expand Down Expand Up @@ -4920,7 +4916,7 @@ To <dfn>open a database connection</dfn> with |storageKey| which requested the [
1. If |db| is null, let |db| be a new [=/database=] with
[=database/name=] |name|, [=database/version=] 0 (zero), and with
no [=/object stores=]. If this fails for any reason, return an
appropriate error (e.g. a "{{QuotaExceededError}}" or
appropriate error (e.g. a {{QuotaExceededError}}, or an
"{{UnknownError}}" {{DOMException}}).

1. If |db|'s [=database/version=] is greater than |version|,
Expand Down Expand Up @@ -5065,7 +5061,7 @@ requested the [=/database=] to be deleted, a database |name|, and a
1. Let |version| be |db|'s [=database/version=].

1. Delete |db|. If this fails for any reason, return an appropriate
error (e.g. "{{QuotaExceededError}}" or "{{UnknownError}}" {{DOMException}}).
error (e.g. a {{QuotaExceededError}}, or an "{{UnknownError}}" {{DOMException}}).

1. Return |version|.

Expand Down Expand Up @@ -5094,7 +5090,7 @@ To <dfn>commit a transaction</dfn> with the |transaction| to commit, run these s

1. If an error occurs while writing the changes to the [=/database=],
then run [=abort a transaction=] with |transaction| and an
appropriate type for the error, for example "{{QuotaExceededError}}" or
appropriate type for the error, for example a {{QuotaExceededError}} or an
"{{UnknownError}}" {{DOMException}}, and terminate these steps.

1. [=Queue a database task=] to run these steps:
Expand Down