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

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

Issue 16123036: Clean up dart:io exceptions. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 6 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 | « runtime/bin/dartutils.cc ('k') | runtime/bin/secure_socket.h » ('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 376 matching lines...) Expand 10 before | Expand all | Expand 10 after
387 return true; 387 return true;
388 } 388 }
389 389
390 bool SyncDirectoryListing::HandleError(const char* dir_name) { 390 bool SyncDirectoryListing::HandleError(const char* dir_name) {
391 Dart_Handle dart_os_error = DartUtils::NewDartOSError(); 391 Dart_Handle dart_os_error = DartUtils::NewDartOSError();
392 Dart_Handle args[3]; 392 Dart_Handle args[3];
393 args[0] = DartUtils::NewString("Directory listing failed"); 393 args[0] = DartUtils::NewString("Directory listing failed");
394 args[1] = DartUtils::NewString(dir_name); 394 args[1] = DartUtils::NewString(dir_name);
395 args[2] = dart_os_error; 395 args[2] = dart_os_error;
396 Dart_ThrowException(Dart_New( 396 Dart_ThrowException(Dart_New(
397 DartUtils::GetDartClass(DartUtils::kIOLibURL, "DirectoryIOException"), 397 DartUtils::GetDartClass(DartUtils::kIOLibURL, "DirectoryException"),
398 Dart_Null(), 398 Dart_Null(),
399 3, 399 3,
400 args)); 400 args));
401 return true; 401 return true;
402 } 402 }
403 403
404 } // namespace bin 404 } // namespace bin
405 } // namespace dart 405 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/bin/dartutils.cc ('k') | runtime/bin/secure_socket.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698