This documentation is archived and is not being maintained.
This documentation is archived and is not being maintained.
property
[Internet Explorer 10. While supported in pre-release versions, this property is obsolete and DOMException.name should be used instead. Applications using this property should be updated accordingly.]
Returns a numeric value representing the error that triggered an exception.
This property is read-only.
Syntax
JavaScript
errcode = object.code
Property values
Type: Number
The value represents the type of exception that was raised and corresponds to one of the following values.
Value
Condition
IDBDatabaseException.UNKNOWN_ERR
0
The cause of an the error does not correspond to an error described below. For example, unexpected system errors are reported using this error code.
Note This has been replaced with "InvalidStateError".
IDBDatabaseException.NON_TRANSIENT_ERR
15
The request was not allowed; the cause depends on the operation.
Note This has been replaced with "InvalidAccessError".
IDBDatabaseException.NOT_FOUND_ERR
8
The requested object could not be found.
Note This has been replaced with "NotFoundError".
IDBDatabaseException.CONSTRAINT_ERR
0
The request was denied because it would violate a data restriction.
Note This has been replaced with "ConstraintError".
IDBDatabaseException.DATA_ERR
0
There is a problem with the data associated with the request.
Note This has been replaced with "DataError".
IDBDatabaseException.NOT_ALLOWED_ERR
11
The request is not allowed for the object or is not allowed at the time the request was made.
Note This has been replaced with "InvalidStateError".
IDBDatabaseException.TRANSACTION_INACTIVE_ERR
0
The transaction associated with the request is not active; it has completed or been canceled.
Note This has been replaced with "TransactionInactiveError".
IDBDatabaseException.ABORT_ERR
20
The request was canceled.
Note This has been replaced with "AbortError".
IDBDatabaseException.READ_ONLY_ERR
0
A change request was attempted during a read-only transaction.
Note This has been replaced with "ReadOnlyError".
IDBDatabaseException.TIMEOUT_ERR
23
The transaction failed to obtain a lock within a reasonable time.
Note This has been replaced with "TimeoutError".
IDBDatabaseException.QUOTA_ERR
22
The request failed because there is not enough storage space available or the user declined a request for more space.
Note This has been replaced with "QuotaExceededError".
IDBDatabaseException.VERSION_ERR
0
The request failed because there is not enough storage space available or the user declined a request for more space.