Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(19)

Side by Side Diff: sdk/lib/web_sql/dart2js/web_sql_dart2js.dart

Issue 711003002: Add some ArgumentError and RangeError constructors that capture more information. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /** 1 /**
2 * An API for storing data in the browser that can be queried with SQL. 2 * An API for storing data in the browser that can be queried with SQL.
3 * 3 *
4 * **Caution:** this specification is no longer actively maintained by the Web 4 * **Caution:** this specification is no longer actively maintained by the Web
5 * Applications Working Group and may be removed at any time. 5 * Applications Working Group and may be removed at any time.
6 * See [the W3C Web SQL Database specification](http://www.w3.org/TR/webdatabase /) 6 * See [the W3C Web SQL Database specification](http://www.w3.org/TR/webdatabase /)
7 * for more information. 7 * for more information.
8 * 8 *
9 * The [dart:indexed_db] APIs is a recommended alternatives. 9 * The [dart:indexed_db] APIs is a recommended alternatives.
10 */ 10 */
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 // To suppress missing implicit constructor warnings. 211 // To suppress missing implicit constructor warnings.
212 factory SqlResultSetRowList._() { throw new UnsupportedError("Not supported"); } 212 factory SqlResultSetRowList._() { throw new UnsupportedError("Not supported"); }
213 213
214 @DomName('SQLResultSetRowList.length') 214 @DomName('SQLResultSetRowList.length')
215 @DocsEditable() 215 @DocsEditable()
216 int get length => JS("int", "#.length", this); 216 int get length => JS("int", "#.length", this);
217 217
218 Map operator[](int index) { 218 Map operator[](int index) {
219 if (JS("bool", "# >>> 0 !== # || # >= #", index, 219 if (JS("bool", "# >>> 0 !== # || # >= #", index,
220 index, index, length)) 220 index, index, length))
221 throw new RangeError.range(index, 0, length); 221 throw new RangeError.index(index, this);
222 return this.item(index); 222 return this.item(index);
223 } 223 }
224 void operator[]=(int index, Map value) { 224 void operator[]=(int index, Map value) {
225 throw new UnsupportedError("Cannot assign element of immutable List."); 225 throw new UnsupportedError("Cannot assign element of immutable List.");
226 } 226 }
227 // -- start List<Map> mixins. 227 // -- start List<Map> mixins.
228 // Map is the element type. 228 // Map is the element type.
229 229
230 230
231 void set length(int value) { 231 void set length(int value) {
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
302 @SupportedBrowser(SupportedBrowser.CHROME) 302 @SupportedBrowser(SupportedBrowser.CHROME)
303 @SupportedBrowser(SupportedBrowser.SAFARI) 303 @SupportedBrowser(SupportedBrowser.SAFARI)
304 @Experimental() 304 @Experimental()
305 // http://www.w3.org/TR/webdatabase/#sqltransactionsync 305 // http://www.w3.org/TR/webdatabase/#sqltransactionsync
306 @Experimental() // deprecated 306 @Experimental() // deprecated
307 @Native("SQLTransactionSync") 307 @Native("SQLTransactionSync")
308 abstract class _SQLTransactionSync extends Interceptor { 308 abstract class _SQLTransactionSync extends Interceptor {
309 // To suppress missing implicit constructor warnings. 309 // To suppress missing implicit constructor warnings.
310 factory _SQLTransactionSync._() { throw new UnsupportedError("Not supported"); } 310 factory _SQLTransactionSync._() { throw new UnsupportedError("Not supported"); }
311 } 311 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698