@@ -1807,12 +1807,11 @@ store.put(4); // will throw DataError
1807
1807
# Exceptions # {#exceptions}
1808
1808
<!-- ============================================================ -->
1809
1809
1810
- Each of the exceptions used in this document is a
1811
- {{DOMException}} with a specific type. The exception types and
1812
- properties such as legacy code value are defined in [[!WEBIDL]] .
1810
+ Each of the exceptions used in this document is a {{DOMException}}
1811
+ or {{DOMException}} -derived interface, as defined in [[!WEBIDL]] .
1813
1812
1814
- The table below lists the {{DOMException}} s used in this
1815
- document along with a description of the exception type 's
1813
+ The table below lists the {{DOMException}} names used in this
1814
+ document along with a description of the exception's
1816
1815
usage.
1817
1816
1818
1817
<table class=props>
@@ -1868,14 +1867,6 @@ usage.
1868
1867
the requested data could not be read.
1869
1868
</td>
1870
1869
</tr>
1871
- <tr>
1872
- <td> {{QuotaExceededError}} </td>
1873
- <td>
1874
- The operation failed because there was not enough remaining
1875
- storage space, or the storage quota was reached and the user
1876
- declined to give more space to the database.
1877
- </td>
1878
- </tr>
1879
1870
<tr>
1880
1871
<td> {{SyntaxError}} </td>
1881
1872
<td> The keyPath argument contains an invalid key path.</td>
@@ -1907,6 +1898,11 @@ usage.
1907
1898
</tr>
1908
1899
</table>
1909
1900
1901
+ Apart from the above {{DOMException}} names, the {{QuotaExceededError}}
1902
+ exception type is to be used if the operation failed because there was
1903
+ not enough remaining storage space, or the storage quota was reached and
1904
+ the user declined to give more space to the database.
1905
+
1910
1906
NOTE:
1911
1907
Given that multiple Indexed DB operations can throw the same type of
1912
1908
error, and that even a single operation can throw the same type of
@@ -2581,7 +2577,7 @@ reasons. Such implementations must still create and return an
2581
2577
creating the [=/object store=] has failed, it must abort the
2582
2578
transaction using the steps to [=abort a transaction=] using the
2583
2579
appropriate error. For example if creating the [=/object store=]
2584
- failed due to quota reasons, a " {{QuotaExceededError}} " {{DOMException }} must be used as
2580
+ failed due to quota reasons, a {{QuotaExceededError}} must be used as
2585
2581
error.
2586
2582
2587
2583
@@ -3486,7 +3482,7 @@ and once the implementation determines that creating the index has
3486
3482
failed, it must run the steps to [=abort
3487
3483
a transaction=] using an appropriate error. For example
3488
3484
if creating the [=/index=] failed due to quota reasons,
3489
- a " {{QuotaExceededError}} " {{DOMException }} must be used as error and if the index can't be
3485
+ a {{QuotaExceededError}} must be used as error and if the index can't be
3490
3486
created due to [=index/unique flag=] constraints, a "{{ConstraintError}} " {{DOMException}}
3491
3487
must be used as error.
3492
3488
@@ -4780,7 +4776,7 @@ NOTE:
4780
4776
due to an uncaught exception in an event handler, the error will be
4781
4777
a "{{AbortError}} " {{DOMException}} . If the [=/transaction=] was aborted due to
4782
4778
an error while committing, it will reflect the reason for the
4783
- failure (e.g. " {{QuotaExceededError}} ", "{{ConstraintError}} ", or
4779
+ failure (e.g. a {{QuotaExceededError}} , or a "{{ConstraintError}} " or
4784
4780
"{{UnknownError}} " {{DOMException}} ).
4785
4781
4786
4782
<div class="domintro note">
@@ -4920,7 +4916,7 @@ To <dfn>open a database connection</dfn> with |storageKey| which requested the [
4920
4916
1. If |db| is null, let |db| be a new [=/database=] with
4921
4917
[=database/name=] |name|, [=database/version=] 0 (zero), and with
4922
4918
no [=/object stores=] . If this fails for any reason, return an
4923
- appropriate error (e.g. a " {{QuotaExceededError}} " or
4919
+ appropriate error (e.g. a {{QuotaExceededError}} , or an
4924
4920
"{{UnknownError}} " {{DOMException}} ).
4925
4921
4926
4922
1. If |db|'s [=database/version=] is greater than |version|,
@@ -5065,7 +5061,7 @@ requested the [=/database=] to be deleted, a database |name|, and a
5065
5061
1. Let |version| be |db|'s [=database/version=] .
5066
5062
5067
5063
1. Delete |db|. If this fails for any reason, return an appropriate
5068
- error (e.g. " {{QuotaExceededError}} " or "{{UnknownError}} " {{DOMException}} ).
5064
+ error (e.g. a {{QuotaExceededError}} , or an "{{UnknownError}} " {{DOMException}} ).
5069
5065
5070
5066
1. Return |version|.
5071
5067
@@ -5094,7 +5090,7 @@ To <dfn>commit a transaction</dfn> with the |transaction| to commit, run these s
5094
5090
5095
5091
1. If an error occurs while writing the changes to the [=/database=] ,
5096
5092
then run [=abort a transaction=] with |transaction| and an
5097
- appropriate type for the error, for example " {{QuotaExceededError}} " or
5093
+ appropriate type for the error, for example a {{QuotaExceededError}} or an
5098
5094
"{{UnknownError}} " {{DOMException}} , and terminate these steps.
5099
5095
5100
5096
1. [=Queue a database task=] to run these steps:
0 commit comments