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

Side by Side Diff: runtime/bin/directory.cc

Issue 26968003: Remove DirectoryException and LinkException from dart:io and use FileException instaed. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Merge with master. Created 7 years, 1 month 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 | « pkg/watcher/lib/src/utils.dart ('k') | runtime/bin/file_patch.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 #include "bin/directory.h" 5 #include "bin/directory.h"
6 6
7 #include "bin/dartutils.h" 7 #include "bin/dartutils.h"
8 #include "bin/thread.h" 8 #include "bin/thread.h"
9 #include "include/dart_api.h" 9 #include "include/dart_api.h"
10 #include "platform/assert.h" 10 #include "platform/assert.h"
(...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after
367 return true; 367 return true;
368 } 368 }
369 369
370 bool SyncDirectoryListing::HandleError(const char* dir_name) { 370 bool SyncDirectoryListing::HandleError(const char* dir_name) {
371 Dart_Handle dart_os_error = DartUtils::NewDartOSError(); 371 Dart_Handle dart_os_error = DartUtils::NewDartOSError();
372 Dart_Handle args[3]; 372 Dart_Handle args[3];
373 args[0] = DartUtils::NewString("Directory listing failed"); 373 args[0] = DartUtils::NewString("Directory listing failed");
374 args[1] = DartUtils::NewString(dir_name); 374 args[1] = DartUtils::NewString(dir_name);
375 args[2] = dart_os_error; 375 args[2] = dart_os_error;
376 Dart_ThrowException(Dart_New( 376 Dart_ThrowException(Dart_New(
377 DartUtils::GetDartType(DartUtils::kIOLibURL, "DirectoryException"), 377 DartUtils::GetDartType(DartUtils::kIOLibURL, "FileSystemException"),
378 Dart_Null(), 378 Dart_Null(),
379 3, 379 3,
380 args)); 380 args));
381 return true; 381 return true;
382 } 382 }
383 383
384 384
385 static bool ListNext(DirectoryListing* listing) { 385 static bool ListNext(DirectoryListing* listing) {
386 switch (listing->top()->Next(listing)) { 386 switch (listing->top()->Next(listing)) {
387 case kListFile: 387 case kListFile:
(...skipping 30 matching lines...) Expand all
418 if (listing->error()) { 418 if (listing->error()) {
419 listing->HandleError("Invalid path"); 419 listing->HandleError("Invalid path");
420 listing->HandleDone(); 420 listing->HandleDone();
421 } else { 421 } else {
422 while (ListNext(listing)) {} 422 while (ListNext(listing)) {}
423 } 423 }
424 } 424 }
425 425
426 } // namespace bin 426 } // namespace bin
427 } // namespace dart 427 } // namespace dart
OLDNEW
« no previous file with comments | « pkg/watcher/lib/src/utils.dart ('k') | runtime/bin/file_patch.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698