Index: runtime/bin/stdio_patch.dart |
diff --git a/runtime/bin/stdio_patch.dart b/runtime/bin/stdio_patch.dart |
index 38c488d1857070345f2796b21336caf916b4c378..941ae374af38f04c8c28d33354704039156be6bf 100644 |
--- a/runtime/bin/stdio_patch.dart |
+++ b/runtime/bin/stdio_patch.dart |
@@ -31,7 +31,11 @@ patch class _StdIOUtils { |
} |
static int _socketType(nativeSocket) { |
- return _getSocketType(nativeSocket); |
+ var result = _getSocketType(nativeSocket); |
+ if (result is OSError) { |
+ throw new FileIOException("Error retreiving socket type", result); |
+ } |
+ return result; |
} |
} |