db.Error Extends goog.debug.Error
A database error. Since the stack trace can be unhelpful in an asynchronous context, the error provides a message about where it was produced.

Inheritance

Constructor

goog.db.Error(errorcontextopt_message)

Parameters

error : number | !DOMError
The DOMError instance returned by the browser for Chrome22+, or an error code for previous versions.
context : string
A description of where the error occured.
opt_message : string=
Additional message.

Instance Methods

Public Protected Private
Defined in goog.db.Error
getName() string
No description.
Returns: string  The name of the error.
code »

Instance Properties

Defined in goog.db.Error
code :
The code for this error.
Code »
constructor :
No description.
Code »
error_ :
The DOMException as returned by the browser.
Code »
constructor :
No description.
Code »
message :
No description.
Code »
name :
No description.
Code »
stack :
No description.
Code »

Static Methods

goog.db.Error.fromException(exmessage) !goog.db.Error
Constructs an goog.db.Error instance from an DOMException. This abstraction is necessary to provide backwards compatibility with Chrome21.
Arguments:
ex : !IDBDatabaseException
The exception that was thrown.
message : string
The error message to add to err if it's wrapped.
Returns: !goog.db.Error  The error that caused the failure.
code »
goog.db.Error.fromRequest(requestmessage) !goog.db.Error
Constructs an goog.db.Error instance from an IDBRequest. This abstraction is necessary to provide backwards compatibility with Chrome21.
Arguments:
request : !IDBRequest
The request that failed.
message : string
The error message to add to err if it's wrapped.
Returns: !goog.db.Error  The error that caused the failure.
code »
goog.db.Error.getCode(name) number
Translates an error name to an error code. This is purely kept for backwards compatibility with Chrome21.
Arguments:
name : string
The name of the erorr.
Returns: number  The error code corresponding to the error.
code »
goog.db.Error.getMessage(code) string
Translates an error code into a more useful message.
Arguments:
code : number
Error code.
Returns: string  A debug message.
code »
goog.db.Error.getName(code) !goog.db.Error.ErrorName
Converts an error code used by the old spec, to an error name used by the latest spec.
Arguments:
code : !goog.db.Error.ErrorCode | number
The error code to convert.
Returns: !goog.db.Error.ErrorName  The corresponding name of the error.
code »

Static Properties

goog.db.Error.superClass_ :
No description.
Code »

Enumerations

goog.db.Error.DatabaseErrorCode_ :
Synthetic error codes for database errors, for use when IndexedDB support is not available. This numbering differs in practice from the browser implementations, but it is not meant to be reliable: this object merely ensures that goog.db.Error is loadable on platforms that do not support IndexedDB.
Constants:
ABORT_ERR
No description.
CONSTRAINT_ERR
No description.
DATA_ERR
No description.
INVALID_ACCESS_ERR
No description.
INVALID_STATE_ERR
No description.
NON_TRANSIENT_ERR
No description.
NOT_ALLOWED_ERR
No description.
NOT_FOUND_ERR
No description.
QUOTA_ERR
No description.
READ_ONLY_ERR
No description.
TIMEOUT_ERR
No description.
TRANSACTION_INACTIVE_ERR
No description.
TRANSIENT_ERR
No description.
UNKNOWN_ERR
No description.
Code »
goog.db.Error.ErrorCode :
Error codes for database errors.
Constants:
ABORT_ERR
No description.
CONSTRAINT_ERR
No description.
DATA_ERR
No description.
INVALID_ACCESS_ERR
No description.
INVALID_STATE_ERR
No description.
NON_TRANSIENT_ERR
No description.
NOT_ALLOWED_ERR
No description.
NOT_FOUND_ERR
No description.
QUOTA_ERR
No description.
READ_ONLY_ERR
No description.
TIMEOUT_ERR
No description.
TRANSACTION_INACTIVE_ERR
No description.
UNKNOWN_ERR
No description.
Code »
goog.db.Error.ErrorName :
Names of all possible errors as returned from the browser.
Constants:
ABORT_ERR
No description.
CONSTRAINT_ERR
No description.
DATA_CLONE_ERR
No description.
DATA_ERR
No description.
INVALID_ACCESS_ERR
No description.
INVALID_STATE_ERR
No description.
NOT_FOUND_ERR
No description.
QUOTA_EXCEEDED_ERR
No description.
READ_ONLY_ERR
No description.
SYNTAX_ERROR
No description.
TIMEOUT_ERR
No description.
TRANSACTION_INACTIVE_ERR
No description.
UNKNOWN_ERR
No description.
VERSION_ERR
No description.
Code »

Package db

Package Reference