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

Side by Side Diff: tools/html_json_doc/lib/html_to_json.dart

Issue 11827017: Update remaining usages of Completer.completeException. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments. Created 7 years, 11 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 | « tools/dom/src/Measurement.dart ('k') | tools/release/version.dart » ('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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 /** 5 /**
6 * Library for extracting the documentation comments from files generated by 6 * Library for extracting the documentation comments from files generated by
7 * the HTML library. The comments are stored in a JSON file. 7 * the HTML library. The comments are stored in a JSON file.
8 * 8 *
9 * Comments must be in either the block style with leading *s: 9 * Comments must be in either the block style with leading *s:
10 * 10 *
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 var outputStream = jsonFile.openOutputStream(); 51 var outputStream = jsonFile.openOutputStream();
52 outputStream.writeString(prettyPrintJson(writeJson)); 52 outputStream.writeString(prettyPrintJson(writeJson));
53 53
54 outputStream.onNoPendingWrites = () { 54 outputStream.onNoPendingWrites = () {
55 completer.complete(_anyErrors); 55 completer.complete(_anyErrors);
56 }; 56 };
57 57
58 outputStream.onClosed = () { 58 outputStream.onClosed = () {
59 completer.complete(_anyErrors); 59 completer.complete(_anyErrors);
60 }; 60 };
61 61
62 outputStream.onError = completer.completeException; 62 outputStream.onError = completer.completeError;
63 }); 63 });
64 64
65 return completer.future; 65 return completer.future;
66 } 66 }
67 67
68 68
69 /** 69 /**
70 * Convert all files on [htmlPath]. 70 * Convert all files on [htmlPath].
71 * 71 *
72 * Returns a future that completes to the converted JSON object. 72 * Returns a future that completes to the converted JSON object.
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after
308 '${prettyPrintJson(json[key], '$indentation ')}'); 308 '${prettyPrintJson(json[key], '$indentation ')}');
309 var recursiveOutput = Strings.join(mapList, ',\n'); 309 var recursiveOutput = Strings.join(mapList, ',\n');
310 output = '$indentation{\n' 310 output = '$indentation{\n'
311 '$recursiveOutput' 311 '$recursiveOutput'
312 '\n$indentation}'; 312 '\n$indentation}';
313 } else { 313 } else {
314 output = '$indentation${JSON.stringify(json)}'; 314 output = '$indentation${JSON.stringify(json)}';
315 } 315 }
316 return output; 316 return output;
317 } 317 }
OLDNEW
« no previous file with comments | « tools/dom/src/Measurement.dart ('k') | tools/release/version.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698