From d93732179bfe4986a54f84970e05a887475a5ce8 Mon Sep 17 00:00:00 2001 From: Sam Ruby Date: Thu, 17 Aug 2000 10:14:50 +0000 Subject: =?UTF-8?q?Better=20error=20reporting=20when=20dll/shared=20librar?= =?UTF-8?q?y=20is=20not=20able=20to=20be=20loaded.=20Submitted=20by:=20B?= =?UTF-8?q?=C3=A5rd=20Farstad=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ext/rpc/java/java.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'ext/rpc/java/java.c') diff --git a/ext/rpc/java/java.c b/ext/rpc/java/java.c index ed78777e77..6bb0aaa2d0 100644 --- a/ext/rpc/java/java.c +++ b/ext/rpc/java/java.c @@ -29,6 +29,13 @@ #include "php_ini.h" #include "php_globals.h" +#ifdef PHP_WIN32 + #include "win32/winutil.h" + #define DL_ERROR php_win_err() +#else + #define DL_ERROR dlerror() +#endif + #include #include @@ -185,7 +192,8 @@ static int jvm_create() { dl_handle = DL_LOAD(javalib); if (!dl_handle) { - php_error(E_ERROR, "Unable to load Java Library %s", javalib); + php_error(E_ERROR, "Unable to load Java Library %s, error: %s", + javalib, DL_ERROR); return -1; } } -- cgit v1.2.1