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

Issue 9630012: Error reporting on File in dart:io (Closed)

Created:
8 years, 9 months ago by Søren Gjesse
Modified:
8 years, 9 months ago
Reviewers:
Mads Ager (google)
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Error reporting on File in dart:io This implements consistent error reporting on all methods on File in dart:io. The async onError method is called with an exception argument which is the same exception as would have been thrown from the corresponding sync method. The one method on Directory which already did this has been updated as well. R=ager@google.com BUG=none TEST=tests/standalone/src/io/FileTest.dart, tests/standalone/src/io/FileInvalidArgumentsTest.dart Committed: https://code.google.com/p/dart/source/detail?r=5396

Patch Set 1 #

Total comments: 12

Patch Set 2 : Addressed comments #

Patch Set 3 : Minor fix #

Patch Set 4 : Minor fix #

Patch Set 5 : Made Dart OSError constructor const #

Total comments: 14

Patch Set 6 : All methods on File on Linux #

Patch Set 7 : Rebased and implemented on all platforms #

Total comments: 36

Patch Set 8 : Addressed review comments from ager@ #

Patch Set 9 : Style issues #

Unified diffs Side-by-side diffs Delta from patch set Stats (+792 lines, -266 lines) Patch
M runtime/bin/builtin_impl_sources.gypi View 1 2 3 4 5 6 7 1 chunk +4 lines, -0 lines 0 comments Download
M runtime/bin/builtin_natives.cc View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
A runtime/bin/common.dart View 1 2 3 4 5 6 7 1 chunk +55 lines, -0 lines 0 comments Download
M runtime/bin/dartutils.h View 1 2 3 4 5 3 chunks +11 lines, -0 lines 0 comments Download
M runtime/bin/dartutils.cc View 1 2 3 4 5 2 chunks +50 lines, -0 lines 0 comments Download
M runtime/bin/directory.h View 1 2 3 4 5 1 chunk +1 line, -4 lines 0 comments Download
M runtime/bin/directory.cc View 1 2 3 4 5 2 chunks +9 lines, -51 lines 0 comments Download
M runtime/bin/directory.dart View 1 2 3 4 5 6 7 1 chunk +17 lines, -4 lines 0 comments Download
M runtime/bin/directory_impl.dart View 1 2 3 4 5 6 6 chunks +13 lines, -22 lines 0 comments Download
M runtime/bin/directory_posix.cc View 1 2 3 4 5 2 chunks +12 lines, -23 lines 0 comments Download
M runtime/bin/directory_win.cc View 1 2 3 4 5 6 1 chunk +21 lines, -37 lines 0 comments Download
M runtime/bin/file.cc View 1 2 3 4 5 11 chunks +80 lines, -28 lines 0 comments Download
M runtime/bin/file.dart View 1 2 3 4 5 6 7 2 chunks +17 lines, -3 lines 0 comments Download
M runtime/bin/file_impl.dart View 1 2 3 4 5 6 7 21 chunks +125 lines, -70 lines 0 comments Download
M runtime/bin/file_linux.cc View 1 2 3 4 5 6 7 2 chunks +18 lines, -0 lines 0 comments Download
M runtime/bin/file_macos.cc View 1 2 3 4 5 6 7 2 chunks +18 lines, -0 lines 0 comments Download
M runtime/bin/file_win.cc View 1 2 3 4 5 6 2 chunks +15 lines, -0 lines 0 comments Download
M runtime/bin/io_sources.gypi View 1 1 chunk +1 line, -0 lines 0 comments Download
A runtime/bin/utils.h View 1 2 3 4 5 6 7 1 chunk +42 lines, -0 lines 0 comments Download
A runtime/bin/utils_linux.cc View 1 2 3 4 5 1 chunk +12 lines, -0 lines 0 comments Download
A runtime/bin/utils_macos.cc View 1 2 3 4 5 1 chunk +12 lines, -0 lines 0 comments Download
A runtime/bin/utils_win.cc View 1 2 3 4 5 6 1 chunk +31 lines, -0 lines 0 comments Download
tests/standalone/src/io/DirectoryTest.dart View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
A tests/standalone/src/io/FileErrorTest.dart View 1 2 3 4 5 6 7 8 1 chunk +213 lines, -0 lines 0 comments Download
M tests/standalone/src/io/FileInvalidArgumentsTest.dart View 1 2 3 4 5 5 chunks +13 lines, -22 lines 0 comments Download

Messages

Total messages: 8 (0 generated)
Søren Gjesse
8 years, 9 months ago (2012-03-08 14:25:00 UTC) #1
Mads Ager (google)
I like the direction and I think it would be good to consistently give an ...
8 years, 9 months ago (2012-03-08 15:04:27 UTC) #2
Søren Gjesse
Addressed all comments. Now a Dart OSError object is only allocated when an error occurs, ...
8 years, 9 months ago (2012-03-08 22:50:53 UTC) #3
Mads Ager (google)
This is looking good. The main issue is the exposed class with one static method. ...
8 years, 9 months ago (2012-03-09 09:40:12 UTC) #4
Søren Gjesse
I have now refactored the change to make the error handling more consistent. Addressed all ...
8 years, 9 months ago (2012-03-13 08:25:55 UTC) #5
Mads Ager (google)
https://chromiumcodereview.appspot.com/9630012/diff/15001/runtime/bin/common.dart File runtime/bin/common.dart (right): https://chromiumcodereview.appspot.com/9630012/diff/15001/runtime/bin/common.dart#newcode6 runtime/bin/common.dart:6: * Class for holding information on an error that ...
8 years, 9 months ago (2012-03-13 10:56:17 UTC) #6
Søren Gjesse
http://codereview.chromium.org/9630012/diff/15001/runtime/bin/common.dart File runtime/bin/common.dart (right): http://codereview.chromium.org/9630012/diff/15001/runtime/bin/common.dart#newcode6 runtime/bin/common.dart:6: * Class for holding information on an error that ...
8 years, 9 months ago (2012-03-13 12:39:48 UTC) #7
Mads Ager (google)
8 years, 9 months ago (2012-03-13 12:46:28 UTC) #8
lgtm

Powered by Google App Engine
This is Rietveld 408576698