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

Unified Diff: runtime/bin/directory_impl.dart

Issue 9630012: Error reporting on File in dart:io (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: runtime/bin/directory_impl.dart
diff --git a/runtime/bin/directory_impl.dart b/runtime/bin/directory_impl.dart
index 5243345902c347b9ea41997f6da9b2e079db5fdf..0430bac8a055224bbe5afed8d994144b7f02a0ab 100644
--- a/runtime/bin/directory_impl.dart
+++ b/runtime/bin/directory_impl.dart
@@ -3,13 +3,6 @@
// BSD-style license that can be found in the LICENSE file.
-// Used for holding error code and error message for failed OS system calls.
-class _OSStatus {
- int _errorCode;
- String _errorMessage;
-}
-
-
class _Directory implements Directory {
static final kCreateRequest = 0;
static final kDeleteRequest = 1;
@@ -22,7 +15,7 @@ class _Directory implements Directory {
static String _current() native "Directory_Current";
static String _createTemp(String template,
- _OSStatus status) native "Directory_CreateTemp";
+ OSError osError) native "Directory_CreateTemp";
static int _exists(String path) native "Directory_Exists";
static bool _create(String path) native "Directory_Create";
static bool _delete(String path, bool recursive) native "Directory_Delete";
@@ -89,8 +82,8 @@ class _Directory implements Directory {
}
void createTempSync() {
- var status = new _OSStatus();
- var result = _createTemp(path, status);
+ var osError = new OSError();
+ var result = _createTemp(path, osError);
if (result != null) {
_path = result;
} else {
« no previous file with comments | « runtime/bin/directory.dart ('k') | runtime/bin/file.h » ('j') | runtime/bin/file.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698