| OLD | NEW |
| 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 Loading... |
| 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 |
| OLD | NEW |