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

Unified Diff: runtime/bin/dartutils.cc

Issue 9839053: Add error handling to random access file (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Rebased to r5810 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
« no previous file with comments | « runtime/bin/dartutils.h ('k') | runtime/bin/file.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/dartutils.cc
diff --git a/runtime/bin/dartutils.cc b/runtime/bin/dartutils.cc
index 410138630582bbcc206ab004a7308f1afe4b512e..baeb8c5ff0a240919767cc3667d74e02ee093d49 100644
--- a/runtime/bin/dartutils.cc
+++ b/runtime/bin/dartutils.cc
@@ -409,6 +409,7 @@ Dart_CObject* CObject::NewByteArray(int length) {
static int kIllegalArgumentError = 1;
static int kOSError = 2;
+static int kFileClosedError = 3;
CObject* CObject::IllegalArgumentError() {
@@ -418,6 +419,13 @@ CObject* CObject::IllegalArgumentError() {
}
+CObject* CObject::FileClosedError() {
+ CObjectArray* result = new CObjectArray(CObject::NewArray(1));
+ result->SetAt(0, new CObjectInt32(CObject::NewInt32(kFileClosedError)));
+ return result;
+}
+
+
CObject* CObject::NewOSError() {
OSError os_error;
return NewOSError(&os_error);
« no previous file with comments | « runtime/bin/dartutils.h ('k') | runtime/bin/file.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698