diff options
| author | Sam Ruby <rubys@php.net> | 2000-08-17 10:14:50 +0000 | 
|---|---|---|
| committer | Sam Ruby <rubys@php.net> | 2000-08-17 10:14:50 +0000 | 
| commit | d93732179bfe4986a54f84970e05a887475a5ce8 (patch) | |
| tree | acba32306d8a1cd9201109d366d02a4584a959f3 /ext/java/java.c | |
| parent | 1f793fd06c38d9d60293b6fce3940c2578f22c9b (diff) | |
| download | php-git-d93732179bfe4986a54f84970e05a887475a5ce8.tar.gz | |
Better error reporting when dll/shared library is not able to be loaded.
Submitted by: Bård Farstad <bf@ez.no>
Diffstat (limited to 'ext/java/java.c')
| -rw-r--r-- | ext/java/java.c | 10 | 
1 files changed, 9 insertions, 1 deletions
| diff --git a/ext/java/java.c b/ext/java/java.c index ed78777e77..6bb0aaa2d0 100644 --- a/ext/java/java.c +++ b/ext/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 <jni.h>  #include <stdio.h> @@ -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;      }    } | 
