Use RETURN_THROWS() in various places

This commit is contained in:
Máté Kocsis 2020-01-03 20:44:29 +01:00
parent bbcfa66e06
commit aadd3aaed9
No known key found for this signature in database
GPG key ID: FD055E41728BF310
33 changed files with 84 additions and 83 deletions

View file

@ -205,7 +205,7 @@ PHP_FUNCTION(com_dotnet_create_instance)
snprintf(buf, sizeof(buf), "Failed to init .Net runtime [%s] %s", where, err);
php_win32_error_msg_free(err);
php_com_throw_exception(hr, buf);
return;
RETURN_THROWS();
}
stuff = (struct dotnet_runtime_stuff*)COMG(dotnet_runtime_stuff);
@ -219,7 +219,7 @@ PHP_FUNCTION(com_dotnet_create_instance)
php_win32_error_msg_free(err);
php_com_throw_exception(hr, buf);
ZVAL_NULL(object);
return;
RETURN_THROWS();
}
where = "QI: System._AppDomain";
@ -231,7 +231,7 @@ PHP_FUNCTION(com_dotnet_create_instance)
php_win32_error_msg_free(err);
php_com_throw_exception(hr, buf);
ZVAL_NULL(object);
return;
RETURN_THROWS();
}
}
@ -247,7 +247,7 @@ PHP_FUNCTION(com_dotnet_create_instance)
cp_it = php_win32_cp_get_by_id((DWORD)cp);
if (!cp_it) {
php_com_throw_exception(E_INVALIDARG, "Could not create .Net object - invalid codepage!");
return;
RETURN_THROWS();
}
obj->code_page = (int)cp_it->id;
@ -311,7 +311,7 @@ PHP_FUNCTION(com_dotnet_create_instance)
snprintf(buf, sizeof(buf), "Failed to instantiate .Net object [%s] [0x%08x] %s", where, hr, err);
php_win32_error_msg_free(err);
php_com_throw_exception(hr, buf);
return;
RETURN_THROWS();
}
}
/* }}} */