From 4d39a171eea2da0c29a04e3fd7cebee95ca4d2c0 Mon Sep 17 00:00:00 2001 From: Wez Furlong Date: Tue, 3 Aug 2004 12:41:26 +0000 Subject: [PATCH] Even more verbosity... --- ext/com_dotnet/com_dotnet.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ext/com_dotnet/com_dotnet.c b/ext/com_dotnet/com_dotnet.c index b45bce0228..e6f92c155a 100644 --- a/ext/com_dotnet/com_dotnet.c +++ b/ext/com_dotnet/com_dotnet.c @@ -179,7 +179,10 @@ PHP_FUNCTION(com_dotnet_create_instance) if (ret == FAILURE) { char buf[1024]; - sprintf(buf, "Failed to instantiate .Net object [%s]", where); + char *err = php_win_err(hr); + snprintf(buf, sizeof(buf), "Failed to instantiate .Net object [%s] %s", where, err); + if (err) + LocalFree(err); php_com_throw_exception(hr, buf TSRMLS_CC); ZVAL_NULL(object); return; -- 2.50.1