| OLD | NEW |
| (Empty) |
| 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 | |
| 3 // BSD-style license that can be found in the LICENSE file. | |
| 4 | |
| 5 part of dart.async; | |
| 6 | |
| 7 /** | |
| 8 * Indicates that loading of [libraryName] is deferred. | |
| 9 * | |
| 10 * This class is obsolete. Instead use the syntax: | |
| 11 * import "library.dart" deferred as prefix; | |
| 12 */ | |
| 13 @Deprecated("Dart sdk v. 1.8") | |
| 14 class DeferredLibrary { | |
| 15 final String libraryName; | |
| 16 final String uri; | |
| 17 | |
| 18 const DeferredLibrary(this.libraryName, {this.uri}); | |
| 19 | |
| 20 /** | |
| 21 * Ensure that [libraryName] has been loaded. | |
| 22 * | |
| 23 * If the library fails to load, the Future will complete with a | |
| 24 * DeferredLoadException. | |
| 25 */ | |
| 26 Future<Null> load() { | |
| 27 throw 'DeferredLibrary not supported. ' | |
| 28 'please use the `import "lib.dart" deferred as lib` syntax.'; | |
| 29 } | |
| 30 } | |
| 31 | |
| 32 /** | |
| 33 * Thrown when a deferred library fails to load. | |
| 34 */ | |
| 35 class DeferredLoadException implements Exception { | |
| 36 DeferredLoadException(String this._s); | |
| 37 String toString() => "DeferredLoadException: '$_s'"; | |
| 38 final String _s; | |
| 39 } | |
| OLD | NEW |