| Index: runtime/bin/dartutils.cc
|
| diff --git a/runtime/bin/dartutils.cc b/runtime/bin/dartutils.cc
|
| index 0c06e266372477dd864293843370da016ffc5f48..03f3a313113aa2f8b56a0552c52c0651179d396a 100644
|
| --- a/runtime/bin/dartutils.cc
|
| +++ b/runtime/bin/dartutils.cc
|
| @@ -785,10 +785,12 @@ Dart_Handle DartUtils::NewDartOSError(OSError* os_error) {
|
| }
|
|
|
|
|
| -Dart_Handle DartUtils::NewDartSocketException(const char* message,
|
| - Dart_Handle os_error) {
|
| - // Create a dart:io SocketException object.
|
| - Dart_Handle type = GetDartType(kIOLibURL, "SocketException");
|
| +Dart_Handle DartUtils::NewDartExceptionWithOSError(const char* library_url,
|
| + const char* exception_name,
|
| + const char* message,
|
| + Dart_Handle os_error) {
|
| + // Create a Dart Exception object with a message and an OSError.
|
| + Dart_Handle type = GetDartType(library_url, exception_name);
|
| Dart_Handle args[2];
|
| args[0] = NewString(message);
|
| args[1] = os_error;
|
| @@ -818,6 +820,17 @@ Dart_Handle DartUtils::NewDartArgumentError(const char* message) {
|
| }
|
|
|
|
|
| +Dart_Handle DartUtils::NewDartIOException(const char* exception_name,
|
| + const char* message,
|
| + Dart_Handle os_error) {
|
| + // Create a dart:io exception object of the given type.
|
| + return NewDartExceptionWithOSError(kIOLibURL,
|
| + exception_name,
|
| + message,
|
| + os_error);
|
| +}
|
| +
|
| +
|
| Dart_Handle DartUtils::NewInternalError(const char* message) {
|
| return NewDartExceptionWithMessage(kCoreLibURL, "InternalError", message);
|
| }
|
|
|