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

Unified Diff: runtime/bin/file.dart

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/file.cc ('k') | runtime/bin/file_impl.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/file.dart
diff --git a/runtime/bin/file.dart b/runtime/bin/file.dart
index 3cc923d81c3bb1121b4a307c1b567c545ffc8329..d0380a924064df45f4b2aced4be1bb0c58e2ded5 100644
--- a/runtime/bin/file.dart
+++ b/runtime/bin/file.dart
@@ -226,12 +226,14 @@ interface RandomAccessFile {
/**
* Read a byte from the file. When the byte has been read the
- * callback is called with the value.
+ * callback is called with the value. If end of file has been
+ * reached the value will be -1.
*/
void readByte(void callback(int byte));
/**
- * Synchronously read a single byte from the file.
+ * Synchronously read a single byte from the file. If end of file
+ * has been reached -1 is returned.
*/
int readByteSync();
@@ -361,7 +363,7 @@ interface RandomAccessFile {
* Sets the handler that gets called when errors occur when
* operating on this file.
*/
- void set onError(void handler(String error));
+ void set onError(void handler(Exception e));
}
« no previous file with comments | « runtime/bin/file.cc ('k') | runtime/bin/file_impl.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698