]> granicus.if.org Git - php/commitdiff
Even more verbosity...
authorWez Furlong <wez@php.net>
Tue, 3 Aug 2004 12:41:26 +0000 (12:41 +0000)
committerWez Furlong <wez@php.net>
Tue, 3 Aug 2004 12:41:26 +0000 (12:41 +0000)
ext/com_dotnet/com_dotnet.c

index b45bce0228fe1cf52ed3a8641fe8599dceb34656..e6f92c155a7a07d9165a26f021f3bccb8798d743 100644 (file)
@@ -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;