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

Side by Side Diff: sdk/lib/io/file_impl.dart

Issue 1010403002: Ensure that stack traces are propagated more often in dart:io. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Tab to space Created 5 years, 9 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 | « sdk/lib/io/directory_impl.dart ('k') | sdk/lib/io/http_impl.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) 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 part of dart.io; 5 part of dart.io;
6 6
7 // Read the file in blocks of size 64k. 7 // Read the file in blocks of size 64k.
8 const int _BLOCK_SIZE = 64 * 1024; 8 const int _BLOCK_SIZE = 64 * 1024;
9 9
10 10
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 } catch (e, stackTrace) { 201 } catch (e, stackTrace) {
202 error(e, stackTrace); 202 error(e, stackTrace);
203 } 203 }
204 }, 204 },
205 onDone: () { 205 onDone: () {
206 completer.complete(_file); 206 completer.complete(_file);
207 }, 207 },
208 onError: error, 208 onError: error,
209 cancelOnError: true); 209 cancelOnError: true);
210 }) 210 })
211 .catchError((e) { 211 .catchError(completer.completeError);
212 completer.completeError(e);
213 });
214 return completer.future; 212 return completer.future;
215 } 213 }
216 214
217 Future<File> close() => 215 Future<File> close() =>
218 _openFuture.then((openedFile) => openedFile.close()); 216 _openFuture.then((openedFile) => openedFile.close());
219 } 217 }
220 218
221 219
222 // Class for encapsulating the native implementation of files. 220 // Class for encapsulating the native implementation of files.
223 class _File extends FileSystemEntity implements File { 221 class _File extends FileSystemEntity implements File {
(...skipping 820 matching lines...) Expand 10 before | Expand all | Expand 10 after
1044 void _checkAvailable() { 1042 void _checkAvailable() {
1045 if (_asyncDispatched) { 1043 if (_asyncDispatched) {
1046 throw new FileSystemException("An async operation is currently pending", 1044 throw new FileSystemException("An async operation is currently pending",
1047 path); 1045 path);
1048 } 1046 }
1049 if (closed) { 1047 if (closed) {
1050 throw new FileSystemException("File closed", path); 1048 throw new FileSystemException("File closed", path);
1051 } 1049 }
1052 } 1050 }
1053 } 1051 }
OLDNEW
« no previous file with comments | « sdk/lib/io/directory_impl.dart ('k') | sdk/lib/io/http_impl.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698