| Index: sdk/lib/io/file_impl.dart
|
| diff --git a/sdk/lib/io/file_impl.dart b/sdk/lib/io/file_impl.dart
|
| index 8ab05f6c5730b2b22159d85da821d1e590107d1a..6da4d9f4f2c0ddf5b412a19a544c0d58e2ef0bee 100644
|
| --- a/sdk/lib/io/file_impl.dart
|
| +++ b/sdk/lib/io/file_impl.dart
|
| @@ -698,11 +698,17 @@ class _RandomAccessFile extends _FileBase implements RandomAccessFile {
|
| external static _read(int id, int bytes);
|
|
|
| List<int> readSync(int bytes) {
|
| + _checkNotClosed();
|
| if (bytes is !int) {
|
| throw new FileIOException(
|
| "Invalid arguments to readSync for file '$_path'");
|
| }
|
| - return _read(_id, bytes);
|
| + var result = _read(_id, bytes);
|
| + if (result is OSError) {
|
| + throw new FileIOException("readSync failed for file '$_path'",
|
| + result);
|
| + }
|
| + return result;
|
| }
|
|
|
| Future<int> readList(List<int> buffer, int offset, int bytes) {
|
|
|