This Appendix defines common parts of the set of API specifications that provide scripted access to device capabilities.
Nokia hereby grants to the W3C a perpetual, nonexclusive, royalty-free, world-wide right and license under any Nokia copyrights on this contribution, to copy, publish and distribute the contribution under the W3C document licenses.
Additionally, should the submission be used as a contribution towards a W3C Activity, Nokia grants a right and license of the same scope to any derivative works prepared by the W3C and based on, or incorporating all or part of, the contribution. Nokia further agrees that any derivative works of this contribution prepared by the W3C shall be solely owned by the W3C.
Nokia Corporation agrees to offer W3C members and non-members granting reciprocal terms a non-assignable, non-sublicensable, worldwide and royalty free license to make, have made, use, sell, have sold, offer to sell, import, and distribute and dispose of implementations of any portion of the submission that is subsequently incorporated into a W3C Recommendation. Such license shall extend to all Essential Claims owned or controlled by Nokia Corporation and shall be available as long as the Recommendation is in effect.
exception DeviceException { DOMString name; DOMString message; int code; }; // Non-recoverable programmatic error codes: const unsigned short MISSING_ARG_ERR = 1; const unsigned short INVALID_ARG_ERR = 2; const unsigned short NOT_SUPPORTED_ERR = 3; // Recoverable or non-programmatic error codes: const unsigned short TIMEOUT_ERR = 100; const unsigned short DATA_NOT_FOUND_ERR = 101; const unsigned short DATA_ALREADY_EXISTS_ERR = 102; const unsigned short SERVICE_BUSY_ERR = 103; const unsigned short SERVICE_IN_USE_ERR = 104; const unsigned short DATA_OUT_OF_RANGE_ERR = 105; const unsigned short NOT_ALLOWED_ERR = 106; const unsigned short SIZE_EXCEEDED_ERR = 107; const unsigned short INVALID_URI_ERR = 108; const unsigned short URI_NOT_FOUND_ERR = 109; const unsigned short URI_ALREADY_EXISTS_ERR = 110;
The name
name
represents an exception type and contains a value DeviceException
.
The message
contains a human-readable error message.
The code
contains
exception code number as specified. Error codes from 1
to
99
represent non-recoverable or programmatic errors. Error codes
greater than 99
represent recoverable or non-programmatic errors.
MISSING_ARG_ERR
INVALID_ARG_ERR
NOT_SUPPORTED_ERR
TIMEOUT_ERR
DATA_NOT_FOUND_ERR
DATA_ALREADY_EXISTS_ERR
SERVICE_BUSY_ERR
SERVICE_IN_USE_ERR
DATA_OUT_OF_RANGE_ERR
NOT_ALLOWED_ERR
SIZE_EXCEEDED_ERR
INVALID_URI_ERR
URI_NOT_FOUND_ERR
URI_ALREADY_EXISTS_ERR