1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/storage/public/mozIStorageError.idl Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,149 @@ 1.4 +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- 1.5 + * vim: sw=2 ts=2 sts=2 expandtab 1.6 + * This Source Code Form is subject to the terms of the Mozilla Public 1.7 + * License, v. 2.0. If a copy of the MPL was not distributed with this 1.8 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 1.9 + 1.10 +#include "nsISupports.idl" 1.11 + 1.12 +%{C++ 1.13 +#ifdef ERROR 1.14 +#undef ERROR 1.15 +#endif 1.16 +%} 1.17 + 1.18 +[scriptable, uuid(1f350f96-7023-434a-8864-40a1c493aac1)] 1.19 +interface mozIStorageError : nsISupports { 1.20 + 1.21 + /** 1.22 + * General SQL error or missing database. 1.23 + */ 1.24 + const long ERROR = 1; 1.25 + 1.26 + /** 1.27 + * Internal logic error. 1.28 + */ 1.29 + const long INTERNAL = 2; 1.30 + 1.31 + /** 1.32 + * Access permission denied. 1.33 + */ 1.34 + const long PERM = 3; 1.35 + 1.36 + /** 1.37 + * A callback routine requested an abort. 1.38 + */ 1.39 + const long ABORT = 4; 1.40 + 1.41 + /** 1.42 + * The database file is locked. 1.43 + */ 1.44 + const long BUSY = 5; 1.45 + 1.46 + /** 1.47 + * A table in the database is locked. 1.48 + */ 1.49 + const long LOCKED = 6; 1.50 + 1.51 + /** 1.52 + * An allocation failed. 1.53 + */ 1.54 + const long NOMEM = 7; 1.55 + 1.56 + /** 1.57 + * Attempt to write to a readonly database. 1.58 + */ 1.59 + const long READONLY = 8; 1.60 + 1.61 + /** 1.62 + * Operation was terminated by an interrupt. 1.63 + */ 1.64 + const long INTERRUPT = 9; 1.65 + 1.66 + /** 1.67 + * Some kind of disk I/O error occurred. 1.68 + */ 1.69 + const long IOERR = 10; 1.70 + 1.71 + /** 1.72 + * The database disk image is malformed. 1.73 + */ 1.74 + const long CORRUPT = 11; 1.75 + 1.76 + /** 1.77 + * An insertion failed because the database is full. 1.78 + */ 1.79 + const long FULL = 13; 1.80 + 1.81 + /** 1.82 + * Unable to open the database file. 1.83 + */ 1.84 + const long CANTOPEN = 14; 1.85 + 1.86 + /** 1.87 + * The database is empty. 1.88 + */ 1.89 + const long EMPTY = 16; 1.90 + 1.91 + /** 1.92 + * The database scheme changed. 1.93 + */ 1.94 + const long SCHEMA = 17; 1.95 + 1.96 + /** 1.97 + * A string or blob exceeds the size limit. 1.98 + */ 1.99 + const long TOOBIG = 18; 1.100 + 1.101 + /** 1.102 + * Abort due to a constraint violation. 1.103 + */ 1.104 + const long CONSTRAINT = 19; 1.105 + 1.106 + /** 1.107 + * Data type mismatch. 1.108 + */ 1.109 + const long MISMATCH = 20; 1.110 + 1.111 + /** 1.112 + * Library used incorrectly. 1.113 + */ 1.114 + const long MISUSE = 21; 1.115 + 1.116 + /** 1.117 + * Uses OS features not supported on the host system. 1.118 + */ 1.119 + const long NOLFS = 22; 1.120 + 1.121 + /** 1.122 + * Authorization denied. 1.123 + */ 1.124 + const long AUTH = 23; 1.125 + 1.126 + /** 1.127 + * Auxiliary database format error. 1.128 + */ 1.129 + const long FORMAT = 24; 1.130 + 1.131 + /** 1.132 + * Attempt to bind a parameter using an out-of-range index or nonexistent 1.133 + * named parameter name. 1.134 + */ 1.135 + const long RANGE = 25; 1.136 + 1.137 + /** 1.138 + * File opened that is not a database file. 1.139 + */ 1.140 + const long NOTADB = 26; 1.141 + 1.142 + 1.143 + /** 1.144 + * Indicates what type of error occurred. 1.145 + */ 1.146 + readonly attribute long result; 1.147 + 1.148 + /** 1.149 + * An error string the gives more details, if available. 1.150 + */ 1.151 + readonly attribute AUTF8String message; 1.152 +};