- MonoError error;
- result = mono_string_new_utf16_checked (mono_domain_get (), buf, len, &error);
- mono_error_set_pending_exception (&error);
- }
+ result = mono_string_new_utf16_handle (mono_domain_get (), buf, len, error);
+ } else
+ result = MONO_HANDLE_NEW (MonoString, NULL);