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

Side by Side Diff: sdk/lib/_internal/lib/js_helper.dart

Issue 315023002: Make DeferredNotLoadedError be a NuSuchMethodError (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 6 months 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
« no previous file with comments | « no previous file | tests/co19/co19-dart2js.status » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library _js_helper; 5 library _js_helper;
6 6
7 import 'dart:collection'; 7 import 'dart:collection';
8 import 'dart:_isolate_helper' show 8 import 'dart:_isolate_helper' show
9 IsolateNatives, 9 IsolateNatives,
10 leaveJsAsync, 10 leaveJsAsync,
(...skipping 2771 matching lines...) Expand 10 before | Expand all | Expand 10 after
2782 2782
2783 /** 2783 /**
2784 * Error thrown when a runtime error occurs. 2784 * Error thrown when a runtime error occurs.
2785 */ 2785 */
2786 class RuntimeError extends Error { 2786 class RuntimeError extends Error {
2787 final message; 2787 final message;
2788 RuntimeError(this.message); 2788 RuntimeError(this.message);
2789 String toString() => "RuntimeError: $message"; 2789 String toString() => "RuntimeError: $message";
2790 } 2790 }
2791 2791
2792 class DeferredNotLoadedError extends Error { 2792 class DeferredNotLoadedError extends Error implements NoSuchMethodError {
2793 String libraryName; 2793 String libraryName;
2794 2794
2795 DeferredNotLoadedError(this.libraryName); 2795 DeferredNotLoadedError(this.libraryName);
2796 2796
2797 String toString() { 2797 String toString() {
2798 return "Deferred library $libraryName was not loaded."; 2798 return "Deferred library $libraryName was not loaded.";
2799 } 2799 }
2800 } 2800 }
2801 2801
2802 abstract class RuntimeType { 2802 abstract class RuntimeType {
(...skipping 509 matching lines...) Expand 10 before | Expand all | Expand 10 after
3312 JS('', '#.addEventListener("error", #, false)', 3312 JS('', '#.addEventListener("error", #, false)',
3313 script, convertDartClosureToJS((event) { 3313 script, convertDartClosureToJS((event) {
3314 completer.completeError( 3314 completer.completeError(
3315 new DeferredLoadException("Loading $uri failed.")); 3315 new DeferredLoadException("Loading $uri failed."));
3316 }, 1)); 3316 }, 1));
3317 JS('', 'document.body.appendChild(#)', script); 3317 JS('', 'document.body.appendChild(#)', script);
3318 3318
3319 return completer.future; 3319 return completer.future;
3320 }); 3320 });
3321 } 3321 }
OLDNEW
« no previous file with comments | « no previous file | tests/co19/co19-dart2js.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698