@@ -1861,12 +1861,11 @@ NOTE:
1861
1861
# Exceptions # {#exceptions}
1862
1862
<!-- ============================================================ -->
1863
1863
1864
- Each of the exceptions used in this document is a
1865
- {{DOMException}} with a specific type. The exception types and
1866
- properties such as legacy code value are defined in [[!WEBIDL]] .
1864
+ Each of the exceptions used in this document is a {{DOMException}}
1865
+ or {{DOMException}} -derived interface, as defined in [[!WEBIDL]] .
1867
1866
1868
- The table below lists the {{DOMException}} s used in this
1869
- document along with a description of the exception type 's
1867
+ The table below lists the {{DOMException}} names used in this
1868
+ document along with a description of the exception's
1870
1869
usage.
1871
1870
1872
1871
<table class=props>
@@ -1922,14 +1921,6 @@ usage.
1922
1921
the requested data could not be read.
1923
1922
</td>
1924
1923
</tr>
1925
- <tr>
1926
- <td> {{QuotaExceededError}} </td>
1927
- <td>
1928
- The operation failed because there was not enough remaining
1929
- storage space, or the storage quota was reached and the user
1930
- declined to give more space to the database.
1931
- </td>
1932
- </tr>
1933
1924
<tr>
1934
1925
<td> {{SyntaxError}} </td>
1935
1926
<td> The keyPath argument contains an invalid key path.</td>
@@ -1961,6 +1952,11 @@ usage.
1961
1952
</tr>
1962
1953
</table>
1963
1954
1955
+ Apart from the above {{DOMException}} names, the {{QuotaExceededError}}
1956
+ exception type is to be used if the operation failed because there was
1957
+ not enough remaining storage space, or the storage quota was reached and
1958
+ the user declined to give more space to the database.
1959
+
1964
1960
NOTE:
1965
1961
Given that multiple Indexed DB operations can throw the same type of
1966
1962
error, and that even a single operation can throw the same type of
@@ -2635,7 +2631,7 @@ reasons. Such implementations must still create and return an
2635
2631
creating the [=/object store=] has failed, it must abort the
2636
2632
transaction using the steps to [=abort a transaction=] using the
2637
2633
appropriate error. For example if creating the [=/object store=]
2638
- failed due to quota reasons, a " {{QuotaExceededError}} " {{DOMException }} must be used as
2634
+ failed due to quota reasons, a {{QuotaExceededError}} must be used as
2639
2635
error.
2640
2636
2641
2637
@@ -3540,7 +3536,7 @@ and once the implementation determines that creating the index has
3540
3536
failed, it must run the steps to [=abort
3541
3537
a transaction=] using an appropriate error. For example
3542
3538
if creating the [=/index=] failed due to quota reasons,
3543
- a " {{QuotaExceededError}} " {{DOMException }} must be used as error and if the index can't be
3539
+ a {{QuotaExceededError}} must be used as error and if the index can't be
3544
3540
created due to [=index/unique flag=] constraints, a "{{ConstraintError}} " {{DOMException}}
3545
3541
must be used as error.
3546
3542
@@ -4870,7 +4866,7 @@ NOTE:
4870
4866
due to an uncaught exception in an event handler, the error will be
4871
4867
a "{{AbortError}} " {{DOMException}} . If the [=/transaction=] was aborted due to
4872
4868
an error while committing, it will reflect the reason for the
4873
- failure (e.g. " {{QuotaExceededError}} ", "{{ConstraintError}} ", or
4869
+ failure (e.g. a {{QuotaExceededError}} , or a "{{ConstraintError}} " or
4874
4870
"{{UnknownError}} " {{DOMException}} ).
4875
4871
4876
4872
<div class="domintro note">
@@ -5010,7 +5006,7 @@ To <dfn>open a database connection</dfn> with |storageKey| which requested the [
5010
5006
1. If |db| is null, let |db| be a new [=/database=] with
5011
5007
[=database/name=] |name|, [=database/version=] 0 (zero), and with
5012
5008
no [=/object stores=] . If this fails for any reason, return an
5013
- appropriate error (e.g. a " {{QuotaExceededError}} " or
5009
+ appropriate error (e.g. a {{QuotaExceededError}} , or an
5014
5010
"{{UnknownError}} " {{DOMException}} ).
5015
5011
5016
5012
1. If |db|'s [=database/version=] is greater than |version|,
@@ -5155,7 +5151,7 @@ requested the [=/database=] to be deleted, a database |name|, and a
5155
5151
1. Let |version| be |db|'s [=database/version=] .
5156
5152
5157
5153
1. Delete |db|. If this fails for any reason, return an appropriate
5158
- error (e.g. " {{QuotaExceededError}} " or "{{UnknownError}} " {{DOMException}} ).
5154
+ error (e.g. a {{QuotaExceededError}} , or an "{{UnknownError}} " {{DOMException}} ).
5159
5155
5160
5156
1. Return |version|.
5161
5157
@@ -5184,7 +5180,7 @@ To <dfn>commit a transaction</dfn> with the |transaction| to commit, run these s
5184
5180
5185
5181
1. If an error occurs while writing the changes to the [=/database=] ,
5186
5182
then run [=abort a transaction=] with |transaction| and an
5187
- appropriate type for the error, for example " {{QuotaExceededError}} " or
5183
+ appropriate type for the error, for example a {{QuotaExceededError}} or an
5188
5184
"{{UnknownError}} " {{DOMException}} , and terminate these steps.
5189
5185
5190
5186
1. [=Queue a database task=] to run these steps:
@@ -6888,6 +6884,7 @@ For the revision history of the second edition, see [that document's Revision Hi
6888
6884
* Clarify cursor iteration predicates (<#450>)
6889
6885
* Add {{IDBObjectStore/getAllRecords(options)}} method to {{IDBObjectStore}} and {{IDBIndex}} . (<#206>)
6890
6886
* Add direction option to {{IDBObjectStore/getAll()}} and {{IDBObjectStore/getAllKeys()}} for {{IDBObjectStore}} and {{IDBIndex}} (<#130>)
6887
+ * Use of {{QuotaExceededError}} has been updated to reflect that it is now a {{DOMException}} -derived interface instead of an exception name. (<#463>)
6891
6888
6892
6889
<!-- ============================================================ -->
6893
6890
# Acknowledgements # {#acknowledgements}
0 commit comments