DatabaseException.hx 4.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. /*
  2. * Copyright (C)2005-2013 Haxe Foundation
  3. *
  4. * Permission is hereby granted, free of charge, to any person obtaining a
  5. * copy of this software and associated documentation files (the "Software"),
  6. * to deal in the Software without restriction, including without limitation
  7. * the rights to use, copy, modify, merge, publish, distribute, sublicense,
  8. * and/or sell copies of the Software, and to permit persons to whom the
  9. * Software is furnished to do so, subject to the following conditions:
  10. *
  11. * The above copyright notice and this permission notice shall be included in
  12. * all copies or substantial portions of the Software.
  13. *
  14. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  15. * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  16. * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  17. * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  18. * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  19. * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
  20. * DEALINGS IN THE SOFTWARE.
  21. */
  22. // This file is generated, do not edit!
  23. package js.html.idb;
  24. /** In the <a title="en/IndexedDB" rel="internal" href="https://developer.mozilla.org/en/IndexedDB">IndexedDB API</a>, an <code>IDBDatabaseException</code> object represents exception conditions that can be encountered while performing database operations.<br><br>
  25. Documentation for this class was provided by <a href="https://developer.mozilla.org/en/IndexedDB/IDBDatabaseException">MDN</a>. */
  26. @:native("IDBDatabaseException")
  27. extern class DatabaseException
  28. {
  29. /** A request was aborted, for example, through a call to<a title="en/IndexedDB/IDBTransaction#abort" rel="internal" href="https://developer.mozilla.org/en/IndexedDB/IDBTransaction#abort"> <code>IDBTransaction.abort</code></a>. */
  30. static inline var ABORT_ERR : Int = 20;
  31. /** A mutation operation in the transaction failed because a constraint was not satisfied. For example, an object, such as an object store or index, already exists and a request attempted to create a new one. */
  32. static inline var CONSTRAINT_ERR : Int = 4;
  33. /** Data provided to an operation does not meet requirements. */
  34. static inline var DATA_ERR : Int = 5;
  35. /** An operation was not allowed on an object. Unless the cause of the error is corrected, retrying the same operation would result in failure. */
  36. static inline var NON_TRANSIENT_ERR : Int = 2;
  37. /** <p>An operation was called on an object where it is not allowed or at a time when it is not allowed. It also occurs if a request is made on a source object that has been deleted or removed.</p> <p>More specific variants of this error includes: <code> TRANSACTION_INACTIVE_ERR</code> and <code>READ_ONLY_ERR</code>.</p> */
  38. static inline var NOT_ALLOWED_ERR : Int = 6;
  39. /** The operation failed, because the requested database object could not be found; for example, an object store did not exist but was being opened. */
  40. static inline var NOT_FOUND_ERR : Int = 8;
  41. static inline var NO_ERR : Int = 0;
  42. /** Either there's not enough remaining storage space or the storage quota was reached and the user declined to give more space to the database. */
  43. static inline var QUOTA_ERR : Int = 22;
  44. /** A mutation operation was attempted in a <code>READ_ONLY</code>&nbsp;transaction. */
  45. static inline var READ_ONLY_ERR : Int = 9;
  46. /** A lock for the transaction could not be obtained in a reasonable time. */
  47. static inline var TIMEOUT_ERR : Int = 23;
  48. /** A request was made against a transaction that is either not currently active or is already finished. */
  49. static inline var TRANSACTION_INACTIVE_ERR : Int = 7;
  50. /** The operation failed for reasons unrelated to the database itself, and it is not covered by any other error code; for example, a failure due to disk IO errors. */
  51. static inline var UNKNOWN_ERR : Int = 1;
  52. /** A request to open a database with a version lower than the one it already has. This can only happen with <a title="en/IndexedDB/IDBOpenDBRequest" rel="internal" href="https://developer.mozilla.org/en/IndexedDB/IDBOpenDBRequest"><code>IDBOpenDBRequest</code></a>. */
  53. static inline var VER_ERR : Int = 12;
  54. /** The most appropriate error code for the condition. */
  55. var code(default,null) : Int;
  56. /** Error message describing the exception raised. */
  57. var message(default,null) : String;
  58. var name(default,null) : String;
  59. function toString() : String;
  60. }