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

Issue 8499018: Post on the error handler in the Directory API when errors are encountered. (Closed)

Created:
9 years, 1 month ago by Mads Ager (google)
Modified:
9 years, 1 month ago
Reviewers:
Søren Gjesse
CC:
reviews_dartlang.org, vm-dev_dartlang.org
Visibility:
Public.

Description

Post on the error handler in the Directory API when errors are encountered. Terminate the listing operation at that point. R=sgjesse@google.com BUG= TEST= Committed: https://code.google.com/p/dart/source/detail?r=1338

Patch Set 1 #

Patch Set 2 : Cosmetic change. #

Patch Set 3 : Fix Windows port. #

Total comments: 6

Patch Set 4 : Address comments. #

Patch Set 5 : Fix Windows build #

Unified diffs Side-by-side diffs Delta from patch set Stats (+111 lines, -51 lines) Patch
M runtime/bin/directory_impl.dart View 2 chunks +0 lines, -3 lines 0 comments Download
M runtime/bin/directory_posix.cc View 1 2 3 5 chunks +60 lines, -25 lines 0 comments Download
M runtime/bin/directory_win.cc View 1 2 3 4 2 chunks +51 lines, -23 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
Mads Ager (google)
9 years, 1 month ago (2011-11-08 15:34:47 UTC) #1
Søren Gjesse
lgtm http://codereview.chromium.org/8499018/diff/3004/runtime/bin/directory_posix.cc File runtime/bin/directory_posix.cc (right): http://codereview.chromium.org/8499018/diff/3004/runtime/bin/directory_posix.cc#newcode116 runtime/bin/directory_posix.cc:116: PostError(error_port, "Directory listing failed for: ", dir_name); This ...
9 years, 1 month ago (2011-11-08 16:56:15 UTC) #2
Mads Ager (google)
9 years, 1 month ago (2011-11-09 08:07:29 UTC) #3
Update all platforms to give better error messages. Thanks.

http://codereview.chromium.org/8499018/diff/3004/runtime/bin/directory_posix.cc
File runtime/bin/directory_posix.cc (right):

http://codereview.chromium.org/8499018/diff/3004/runtime/bin/directory_posix....
runtime/bin/directory_posix.cc:116: PostError(error_port, "Directory listing
failed for: ", dir_name);
On 2011/11/08 16:56:16, Søren Gjesse wrote:
> This does not say anything about the actual error. Isn't that something that
> could be of interest?

Yes. Refactored so PostError always extracts the error message with strerror_r
and makes that part of the message for all of these errors.

http://codereview.chromium.org/8499018/diff/3004/runtime/bin/directory_posix....
runtime/bin/directory_posix.cc:134: completed) {
On 2011/11/08 16:56:16, Søren Gjesse wrote:
> Maybe it is just the naming, but "while (completed) { ... } sounds wrong.

I agree. Renamed to listing_error and updated the use 'while (!listing_error)'.

http://codereview.chromium.org/8499018/diff/3004/runtime/bin/directory_posix....
runtime/bin/directory_posix.cc:166: HandleDir(entry.d_name,
On 2011/11/08 16:56:16, Søren Gjesse wrote:
> Why is completed not updated here?

Whoops, good catch. Done!

Powered by Google App Engine
This is Rietveld 408576698